Trying to sharpen my coding skills, I felt that the best and most practical way was to solve some of the interview questions circulating on the internet from companies like Facebook, Airbnb, etc.
NOTE: I know that my solutions MAY NOT be the best, if you have suggestions for improvements, please by all means drop me a message or add them to the repo directly.
Compiled List with Solutions (in Codepen) Here
- Given two identical (but not the same) DOM trees, and a node from one of them, how do you find the same node in from other tree?
- How do you deeply flatten an array, recursively & iteratively?
- Given a M x N matrix of characters, we want a message that starts from character at (0, 0). We then move 1 column right and one row down to get the next character, except: If we run out of rows down, then move one row up instead, and vise versa. If we run out of columns, then the message ends.
- We want to do a type-ahead search whenever user enters a character, but we only want to call the API 500ms after user stops typing, how do you implement this?
- Using HTML and CSS, how would you create an image that would display another image (aligned to the bottom, right) when the user hovers over the image?
- How to implement square root function?