leetcode算法思路總結(持續更新..)

1.兩數之和 2.求兩數之和 tip1:需要一個預先結點最後返回結果爲預先節點的下一個結點 tip2:進位 int carry=0;//先將進位置爲0 int sum=x+y+carry; carry=sum/10;//下一次的進位 tip3:當前位的值 3無重複字符的最長字串 —滑動窗口 tip1:new hash’Map<Character,Integer> ;//用於存儲 出現的字符串和位置
相關文章
相關標籤/搜索