Some time ago to participate in the interview, the interviewer began to let me do a problem, he read, let me answer the question of time complexity and optimization, then I understand what is the complexity of time, but do not know how to calculate, a start on the wrong, and then did not then, Once I visited the blog park when I saw a blogger's article said that there is leetcode this thing, so I know the leetcode. Suddenly there is a doubt: the front-end learning algorithm? I read a blog post: Why do I think data structures and algorithms are important for front-end development?
I think, the front-end should be to learn the algorithm, and soon after the front-end clarity, to do the workload is not lower than the back-end staff, will also be like optimizing the page to optimize JS, since this, learning algorithms and data structure of their own logic and the mind have a great upgrade.
Leetcode Inside there are a lot of algorithm problems, simple, medium, difficult to have, nothing to write, if not good, at least for their own no harm. I'll update the algorithm in JavaScript to implement Leetcode in turn, the answer is on your github, you can jump by clicking on the title. In the logical aspect, is oneself the biggest short board, therefore in does the algorithm question inevitably is not the optimal answer, first solved to optimize again. Start with the simple first ...
Array
**Two sum of the numbers **repeating items in a sorted array **duplicate elements present **flipping an array
String
**Flip String **number of Inverse regularization **Simple palindrome Number
Data structure
Mathematical
**Fizz Buzzemmm ..., I know my answer is not the best answer, but at least I think it out, thick skin to show everyone, and give their own ideas, we think together progressalso, learn from others, bring star???? to your GitHub, and welcome star .
Implementing algorithms in Leetcode in JavaScript (updated)