Skip to content

Replaced recursive search algorithm with iterative algorithm.#1

Open
Dfmaaa wants to merge 1 commit intoinfraredCoding:masterfrom
Dfmaaa:patch-1
Open

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

Conversation

@Dfmaaa
Copy link

@Dfmaaa Dfmaaa commented Dec 2, 2022

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
Owner

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

@Dfmaaa
Copy link
Author

Dfmaaa commented Dec 2, 2022

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
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