371. Sum of Two Integers:這題完全不會(huì)啊储笑,看了答案都沒(méi)咋看懂,竟然是簡(jiǎn)單難度的?
226. Invert Binary Tree: 典型的divide and conquer問(wèn)題
258. Add Digits: 數(shù)學(xué)的trick,不是很值得關(guān)注,雖然沒(méi)做出最優(yōu)解茸苇,但是做出了程序員應(yīng)該知道的解法
283. Move Zeroes: 雙指針,只是在inc的的時(shí)候沦寂,要注意一步一步來(lái)学密,這樣比較容易控制指針位置
492. Construct the Rectangle: 直接loop,也許有些數(shù)學(xué)的方法會(huì)簡(jiǎn)化传藏,不過(guò)數(shù)學(xué)實(shí)在不算面試的一個(gè)方向
521. Longest Uncommon Subsequence I: 這題挺詭異腻暮,不過(guò)面試時(shí)候不可能遇到,也許在follow up里吧漩氨,但是做一遍也就會(huì)了西壮,不用重新visit
530. Minimum Absolute Difference in BST: 遞歸inorder traversal,感覺(jué)用divide and conquer也可以做叫惊,不過(guò)沒(méi)去嘗試
506. Relative Ranks:這題沒(méi)啥好做的
167. Two Sum II - Input array is sorted: two sum的題估計(jì)再也沒(méi)有面試公司考了吧
455. Assign Cookies: 小朋友排排坐
453. Minimum Moves to Equal Array Elements: 又是一道數(shù)學(xué)題
383. Ransom Note: 用hashmap款青,只要用hashmap的題目都不算難
349. Intersection of Two Arrays:也是沒(méi)什么難度
404. Sum of Left Leaves:主要還是traversal
122. Best Time to Buy and Sell Stock II: 只要t+1時(shí)間的值大于t的值就買賣一次,如果小于就加0
387. First Unique Character in a String:基本的hashmap的應(yīng)用
171. Excel Sheet Column Number: 和羅馬字那個(gè)差不多
237. Delete Node in a Linked List:所有l(wèi)inkedlist tag的題目我都手動(dòng)完成過(guò)霍狰,linkedlist無(wú)難題抡草,不過(guò)等到再遇到的時(shí)候再試試,尤其是那些reverse還要用到遞歸的