标签: 算法
-
24. Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and …
-
31. Next Permutation
Implement next permutation, which rearranges numbers in…
-
22. Generate Parentheses
Given n pairs of parentheses, write a function to gener…
-
19. Remove Nth Node From End of List
Given a linked list, remove the n-th node from the end …
-
18. 4Sum
Given an array nums of n integers and an integer target…
-
16. 3Sum Closest
Given an array nums of n integers and an integer target…
-
17. Letter Combinations of a Phone Number
Given a string containing digits from 2-9 inclusive, re…
-
PAT A1079
思路借鉴了之前的图的层数,发现这个贼好用;关键在于输出浮点数的格式,这个要注意一下 {代码…}
-
PAT A1102
并查集用多了。。。第一时间想到的是并查集却没有想到静态数组,这是一个比较大的失误;这道题的关键在于如下几个点:…
-
浅谈算法学习
高中浑浑噩噩度过三年,大学就读于一所二本院校软件工程专业。现在的我很庆幸自己选择了这个行业,我喜欢编码,也喜欢…