singhshivam / leetcode

1 stars 3 forks source link

Front-end questions #29

Open singhshivam opened 4 years ago

singhshivam commented 4 years ago

Facebook FEE Intern

Decoded message: I R O C L E D


- [x] you should know event bubbling, debounce (its variant)... know how to code it
- [ ] Poll Widget question (just know your positioning, relative, static etc know the differences inside out).
- [x] If you have 500 revisions of a program, write a program that will find and return the FIRST bad revision given a isBad(revision i) function.
- [x] Given an input array and another array that describes a new index for each element, mutate the input array so that each element ends up in their new index. Discuss the runtime of the algorithm and how you can be sure there won't be any infinite loops.
- [x] Given a picture, how would you hide/show a child picture on hovering on this parent?
- [x] How would you ensure clicking on this picture would go to a specific link?
- [x] How would you ensure the child is positioned in the top right of the parent picture?
- [x] Given an array, return it's flattened structure(skip objects)
- [x] what is 'this', what is closure, var vs const vs let, DOM tree
- [ ] Basic graph algo & DS style whiteboarding question  
- [ ] Front-end related algorithms and DS questions
- [ ] Implement a simple store class with set(Node, value), get(Node) and has(Node) methods, which store a given Nodes with corresponding values.
- [x] Implement a square root function.
- [x] how could you implement debouncing?
- [x] how could you implement throttling?
- [x] Say you wanted the `handleScroll` function to be called only after 200ms has passed between scroll events
- [ ] Build a puzzle game with Javascript
- [x] function currying
- [x] polyfill for bind
- [x] hoisting
singhshivam commented 4 years ago

https://codesandbox.io/s/o2nplqz96?from-embed

https://github.com/alonsovidales/facebook-programming-challenges