Amazon interview question

Write a JS code to travers the DOM and find an element with a specified class name

Interview Answer

Anonymous

26 Feb 2012

Start simple. They will try to push you to optimize it (O(n) vs O(log n), recursive etc). Be aware of edge cases. Depthvs breadth)

1