标签: 算法
-
94. Binary Tree Inorder Traversal
Given a binary tree, return the inorder traversal of it…
-
PAT A1038
还是贪心算法应用;建立string的数组,输入之后,两两进行比较,a+b>b+a,则两两交换位置,将每个…
-
PAT A1101
这道题的题目和之前的PAT题目相同,也是采用打表的方法;先预先算好所有的元素;建立两个数组,left,righ…
-
199. Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the r…
-
179. Largest Number
Given a list of non negative integers, arrange them suc…
-
165. Compare Version Numbers
Compare two version numbers version1 and version2.If ve…
-
PAT A1029
具体的思路就是,输入第一个序列;在输入第二个序列的时候进行判断,主要的判断逻辑为:如果输入的值小于第一个序列的…
-
93. Restore IP Addresses
Given a string containing only digits, restore it by re…
-
92. Reverse Linked List II
Reverse a linked list from position m to n. Do it in on…
-
55. Jump Game
Given an array of non-negative integers, you are initia…