pooja-gera / algorithm-finder

https://algorithm-finder.vercel.app/
4 stars 8 forks source link

[Optimization]: Path traversal to visit each node in the path flow exactly once #8

Closed Ananya-Bhardwaj closed 1 month ago

Ananya-Bhardwaj commented 1 month ago

This PR solves issue #3 by assigning the current node in the flow path while iterating through the path itself, eliminating the need to find the node from the root, each time.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
algorithm-finder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 8:43am
pooja-gera commented 1 month ago

Hey @Ananya-Bhardwaj the thing you were mentioning about Yes and No buttons being available for all, we can add a check here only, when you are setting the current node to yes or no branch while clicking the yes / no button, add these conditions

For Yes button click: if currNode.yes !== null then set currNode to be currNode.yes else disable yes button

For No button click if currNode.no !== null then set currNode to be currNode.no else disable yes button

Ananya-Bhardwaj commented 1 month ago

Okay I will add this

pooja-gera commented 1 month ago

Hey @Ananya-Bhardwaj can you resolve the merge conflicts before we merge this branch? ^.^

Ananya-Bhardwaj commented 1 month ago

Sure, I'll check

pooja-gera commented 1 month ago

LGTM, https://forms.gle/wFVCMgDEyDUqQ1HZ6 please fill out this form with your t-shirt size, you'll receive it within 2 weeks of the completion of hacktoberfest 2024. Thankyou @Ananya-Bhardwaj you're awesome! 🤩