Skip to content

shvilam/DFSHtmlDOMSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFSHtmlDOMSearch

I had to find a soltoin for a modfide BFS search angoritem And I know that they are doing a lote of JS for dom manupolation so. So after the interview I thught I will chalange myself and write that in js

I am not sure that I complitliy remember the question it was kind of long (the intreview was in Chegg) so if some one can contrbutue and give more detiles for the question that will be great. But i do remember the answer here is the mix of the answer and the quetion.

each node has: node |->parent |->children[] |->next_siblean

The main Idea was doing a modfied BFS search but you are are getting a node (anywhere on the tree) and you have to return the first red node first you travel to your children all the way to the leaf and to your brodthers then you have to ignore any node that you whould have to use in order to travle to the node that you got in start

DFS html DOM search

About

DFS html DOM search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published