一、 #include<iostream> #include<stack> #include<string> using namespace std; ...
include lt stdio.h gt include lt string.h gt pInputStr中是原來待處理的字符串,m是其大小 pOutputStr是刪除重復后的字符串,其大小用n返回 void RemoveRepeatChar const char pInputStr, int m,char pOutputStr, int n int k 開始時,pOutputStr是空的,所 ...
2012-09-12 12:08 0 4689 推薦指數:
一、 #include<iostream> #include<stack> #include<string> using namespace std; ...
...
1、生成一個隨機四位數,每位數字不重復。 ...
題目描述 bug太多 題目描述 輸入一個單向鏈表和一個節點的值,從單向鏈表中刪除等於該值的節點,刪除后如果鏈表中無節點則返回空指針。 鏈表結點定義如下: struct ListNode { int m_nKey ...
共三題,第一題簽到題,第二題字符串處理,不是很復雜的那種,第三題將數組分割使得最小值最大。 數組分割使最小值最大:二分最小值,同時check是否有k組大於最小值。題目還要求有多個答案時,第一個分組盡可能地大,如果第一個分組也有多種情況,要使第二個分組盡可能地大,可以貪心處理,從后往前 ...
1、選秀節目打分,分為專家評委和大眾評委,score[] 數組里面存儲每個評委打的分數,judge_type[] 里存儲與 score[] 數組對應的評委類別,judge_type[i] == 1,表 ...
def sloutions(str): lens = len(str) start = 0 max_over_str = 0 for i in range(l ...
...