LeetCode26: Given an ordered sequence, the number of different elements is obtained and different sequences are returned, requiring the return in situ , O (1) space (+, Easy)
minutes, the first time on the AC slightly happy, the best record 406ms seems to be the former 1%! Although this time is not reliable
Nothing to optimize, feel almost no scrap code
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/BD/wKiom1S6QJjAMt4WAAC7m78ysZc152.jpg "title=" Leetcode26.png "style=" Float:none; "alt=" wkiom1s6qjjamt4waac7m78yszc152.jpg "/>
Experience? : Is there really a company test so simple?
parentheses match. (Easy)
It is best to record 430ms, before 10%. A little bit clever, but not good (using the exception to judge)
Experience 8: Using a Stack is much more efficient than using arrays, and for this problem
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/BB/wKioL1S6QWiAvquZAAHkiMDqfeA739.jpg "title=" Leetcode20.png "style=" Float:none; "alt=" wkiol1s6qwiavquzaahkimdqfea739.jpg "/>
Experience? : Is there really a company test so simple?
determine whether a number is a palindrome number, can not use extra space (this is strange, no extra space to run without the Loop) (9, Easy) (opportunistic method)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/BD/wKiom1S6QJeBZd9DAADxiTZiqsQ082.jpg "title=" Leetcode9-1.png "style=" Float:none; "alt=" wkiom1s6qjebzd9daadxitziqsq082.jpg "/>
formal Practice: less optimization. Probably can run to the front 50%, the best record 713ms
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/BB/wKioL1S6QWfDrVqbAAEQzImN3uw891.jpg "title=" Leetcode9-2.png "style=" Float:none; "alt=" wkiol1s6qwfdrvqbaaeqzimn3uw891.jpg "/>
Experience? : Is there really a company test so simple?
This article is from the "Code Farmers Self-Cultivation" blog, please be sure to keep this source http://08310302.blog.51cto.com/7006444/1605144
Leetcode notes Two (26, 20,9)