Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert and read tree #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

insert and read tree #5

wants to merge 1 commit into from

Conversation

parth-agrawal
Copy link
Collaborator

@parth-agrawal parth-agrawal commented Jun 26, 2024

🚀 This description was created by Ellipsis for commit c8dff3d

Summary:

Restructured project files for algorithms and data structures, added tree data structure implementation, and updated redirection path.

Key points:

  • Deleted src/app/algorithms/page.tsx.
  • Renamed and moved algorithm-related files from src/app/algorithms to src/app/dsa.
  • Added src/app/dsa/page.tsx to include links to algorithms and data structures.
  • Implemented tree data structure in src/app/dsa/tree/tree.ts with insertNode and readTree functions.
  • Updated src/app/page.tsx to redirect from /algorithms to /dsa.

Generated with ❤️ by ellipsis.dev

Copy link

netlify bot commented Jun 26, 2024

Deploy Preview for parths-algorithms ready!

Name Link
🔨 Latest commit c8dff3d
🔍 Latest deploy log https://app.netlify.com/sites/parths-algorithms/deploys/667c757ea6f3180008c2f47d
😎 Deploy Preview https://deploy-preview-5--parths-algorithms.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to c8dff3d in 1 minute and 4 seconds

More details
  • Looked at 205 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/app/dsa/tree/tree.ts:1
  • Draft comment:
    The import of root from postcss appears to be unused and should be removed to clean up the code.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_72PGy2yQhGJg6psL


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

// }

// takes a value and a tree (root) and returns a new tree (root)
const insertNode = (value: number, root: Node): Node => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The insertNode function does not handle the case where the inserted value is equal to the current node's value. Consider adding logic to handle this scenario to prevent potential issues.



}
const readTree = (root: Node, callback: Function) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callback parameter in readTree is typed as Function, which is not type-safe. Consider defining a more specific function type for better type safety and clarity.

</div>
<div className="flex flex-col underline items-center">

<Link href="/algorithms/bubblesort">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The links in this component still point to the old /algorithms path. Update the href attributes to point to the correct paths under /dsa to ensure the links work correctly.

Suggested change
<Link href="/algorithms/bubblesort">
<Link href="/dsa/bubblesort">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant