Skip to content

Replaced recursive search algorithm with iterative algorithm.#1

Open
Dfmaaa wants to merge 1 commit into
infraredCoding:masterfrom
Dfmaaa:patch-1
Open

Replaced recursive search algorithm with iterative algorithm.#1
Dfmaaa wants to merge 1 commit into
infraredCoding:masterfrom
Dfmaaa:patch-1

Conversation

@Dfmaaa

@Dfmaaa Dfmaaa commented Dec 2, 2022

Copy link
Copy Markdown

It does the same thing but doesn't take up a lot of stack frames.

It does the same thing but doesn't take up a lot of stack frames.
@infraredCoding

Copy link
Copy Markdown
Owner

This actually seems quite good. I'll definitely test this out. Thanks a lot

@Dfmaaa

Dfmaaa commented Dec 2, 2022

Copy link
Copy Markdown
Author

Thanks! Also, I noticed you aren't using an AVL tree in Routes.c. Yes, I agree that it would increase insertion time but the search time would decrease. Isn't that good for this project?

@infraredCoding

Copy link
Copy Markdown
Owner

That'd be an interesting tradeoff. Practically, users would staticly define their routes. So, the insertion time shouldn't really be a problem. I haven't implemented an AVL yet but it seems like a viable option

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.

2 participants