pooja-gera / algorithm-finder

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

Remove unused variable 'algorithmFinderRoot' to resolve ESLint warning #4

Closed tejaswi0910 closed 1 month ago

tejaswi0910 commented 1 month ago

In the file src/components/tree.js, the variable algorithmFinderRoot is declared on line 69 but is never used. This is causing an ESLint warning: Line 69:7: 'algorithmFinderRoot' is assigned a value but never used no-unused-vars

Since the root node is already stored in the algorithmFinder object, the variable algorithmFinderRoot can be removed to resolve this issue without affecting the functionality of the code.

pooja-gera commented 1 month ago

Hmm, I think I was debugging something so left it in there. Good catch!

Please feel free to work on it, happy open source month to you! 🥳

pooja-gera commented 1 month ago

While you're at it, can you please remove the commented line in the bottom where printTree function is called, let the function be there in the class though, for future debugging purposes.

tejaswi0910 commented 1 month ago

While you're at it, can you please remove the commented line in the bottom where printTree function is called, let the function be there in the class though, for future debugging purposes.

Agreed, kept the printTree function in the binaryTree class but removed the comment.