兩個(gè)數(shù)組,一個(gè)存start,一個(gè)存end,分別sort。如果當(dāng)前start >= end[last],說(shuō)明這個(gè)start可以和上一個(gè)end用一間...
int[] arr = {1, 2, 3}sub array 必須是連續(xù)的元素,比如{1}, {1,2}, {1,2,3},不能有{1,3}su...
Example 1: Given 1->2->3->4, reorder it to 1->4->2->3.Example 2: Given 1...
Given a circular array (the next element of the last element is the firs...
You are given two arrays (without duplicates) nums1 and nums2 where nums...
Below are the permutations of string ABC.ABC ACB BAC BCA CBA CAB idea: 交...
位運(yùn)算:優(yōu)先度低于+-*/&與:0&1,0&0 =0,1&1=1,可以通過(guò)n&(n-1)使得最末尾的1變成0,進(jìn)而算出n中有多少1 異或運(yùn)算,1...
考完561第一次期中了,可以有時(shí)間寫(xiě)簡(jiǎn)歷繼續(xù)刷題了,雖然還有585作業(yè)....不過(guò)感覺(jué)能豐富簡(jiǎn)歷(劃掉),加油找工作啊wyz?。。。。。?
剛把561的作業(yè)交了,各種搜索方法的代碼實(shí)現(xiàn)還是個(gè)大問(wèn)題啊,第一次寫(xiě)dfs簡(jiǎn)直手足無(wú)措,還是立志phd大佬指導(dǎo),直接給了份n棋盤(pán)k皇后的代碼,才...