一.解法 https://leetcode-cn.com/problems/bulls-and-cows/ 要點(diǎn):hashmapPython,C++,Java都...
一.解法 https://leetcode-cn.com/problems/bulls-and-cows/ 要點(diǎn):hashmapPython,C++,Java都...
一.解法 https://leetcode-cn.com/problems/nim-game/ 要點(diǎn):數(shù)學(xué),動(dòng)態(tài)規(guī)劃一開始想到用動(dòng)態(tài)規(guī)劃做,見java代碼,思路...
一.解法 https://leetcode-cn.com/problems/word-pattern/ 要點(diǎn):hashmapPython,C++,Java都用了相同...
一.解法 https://leetcode-cn.com/problems/move-zeroes/ 要點(diǎn):雙指針C++用了從后往前找0冒泡排序的方法,效率較低Pyth...
一.解法 https://leetcode-cn.com/problems/first-bad-version/ 要點(diǎn):二分法Python,C++,Java都用了二分法...
一.解法 https://leetcode-cn.com/problems/missing-number/要點(diǎn):數(shù)學(xué),hashmap,排序C++用了排序的方法,遍歷一遍找到0...
一.解法 https://leetcode-cn.com/problems/ugly-number/要點(diǎn):數(shù)學(xué)丑數(shù)除去所有的2,所有的3,所有的5必為一用三個(gè)while循環(huán)即...
一.解法 https://leetcode-cn.com/problems/add-digits/要點(diǎn):數(shù)學(xué)這道題可以用循環(huán)方法解決,將給定的數(shù)字的各個(gè)位相加得到新的數(shù)字,一...
一.解法 https://leetcode-cn.com/problems/binary-tree-paths/要點(diǎn):遞歸,DFSPython,C++,Java都用了遞歸的方...