hdu 1023 Train Problem II 這題運用到大數相乘+大數相除+卡特蘭數,hdu1023Train Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6454 Accepted Submission(s): 351
[LeetCode] Search Insert Position,leetcodeinsert題意: 給出一個target找出他在有序數組中的位置思路1: 直接遍曆 複雜度O(N)代碼1: public int searchInsert1(int[] A, int target) {//直接遍曆 演算法O(N) int i = 0; if(target < A[0]) return 0; if(target > A[A.length
[LeetCode] Letter Combinations of a Phone Number,leetcodeLetter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone
[LeetCode] Construct Binary Tree from Inorder and Postorder Traversal,leetcodeinorderConstruct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that
題目1121:首字母大寫,1121字母大寫題目描述: 對一個字串中的所有單詞,如果單詞的首字母不是大寫字母,則把單詞的首字母變成大寫字母。在字串中,單詞之間通過空白符分隔,空白符包括:空格(' ')、定位字元('\t')、斷行符號符('\r')、分行符號('\n')。輸入: 輸入一行:待處理的字串(長度小於100)。輸出: 可能有多組測試資料,對於每組資料,輸出一行:轉換後的字串。範例輸入: if so, you already have a google account.
LeetCode_Valid Sudoku,leetcode_valid一.題目Valid Sudoku Total Accepted: 29804 Total Submissions: 109584My SubmissionsDetermine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be