MCPcopy Create free account

hub / github.com/Flamewaker/JavaPersonalSummary / functions

Functions1,445 in github.com/Flamewaker/JavaPersonalSummary

MethodnewCar
()
Code/design/creatation/factory/factorymethod/AbstractCarFactory.java:10
MethodnewMask
()
Code/design/creatation/factory/abstractfactory/WulinFactory.java:16
MethodnewMask
()
Code/design/creatation/factory/abstractfactory/WulinCarFactory.java:10
MethodnewMask
()
Code/design/creatation/factory/abstractfactory/WulinHangZhouMaskFactory.java:8
MethodnewMask
()
Code/design/creatation/factory/abstractfactory/WulinMaskFactory.java:13
Methodnext
()
Code/design/behavioral/state/MatchState.java:14
Methodnext
()
Code/design/behavioral/state/BeafNodleState.java:13
Methodnext
()
Code/design/behavioral/iterator/BeautifulMan.java:41
Methodnext
(int val)
Code/leetcode/offer2/Offer041.java:27
MethodnextPermutation
(int[] nums)
Code/leetcode/hotandtop/LeetCode31.java:11
MethodnextPermutation
(int[] nums)
Code/leetcode/normal/LeetCode0031.java:16
MethodnextState
()
Code/design/behavioral/state/SKTTeam.java:24
MethodnoRecQuickSort
(int left, int right, int[] nums)
Code/leetcode/normal/LeetCode0912.java:73
MethodnotifyFans
(String msg)
Code/design/behavioral/observer/AbstractTikToker.java:14
MethodnthUglyNumber
(int n)
Code/leetcode/offer1/Offer49.java:13
MethodnumIslands
(char[][] grid)
Code/leetcode/normal/LeetCode0200.java:9
MethodnumSquares
(int n)
Code/leetcode/normal/LeetCode0279.java:13
MethodnumSquares2
(int n)
Code/leetcode/normal/LeetCode0279.java:34
MethodnumSubarrayProductLessThanK
(int[] nums, int k)
Code/leetcode/offer2/Offer009.java:11
MethodnumTrees
(int n)
Code/leetcode/hotandtop/LeetCode96.java:18
MethodnumWays
(int n)
Code/leetcode/offer1/Offer10_2.java:9
MethododdEvenList
(ListNode head)
Code/leetcode/normal/LeetCode0328.java:19
MethododdEvenList2
(ListNode head)
Code/leetcode/normal/LeetCode0328.java:42
Methodpartition
(String s)
Code/leetcode/hotandtop/LeetCode131.java:14
Methodpartition
(ListNode head, int x)
Code/leetcode/normal/LeetCode0086.java:18
MethodpathSum
给定一个二叉树和一个目标和,找到所有从根节点到叶子节点路径总和等于给定目标和的路径。 @param root @param sum @return List<List<Integer>>
Code/leetcode/datastructure/BinaryTree.java:349
MethodpathSum
(TreeNode root, int sum)
Code/leetcode/offer1/Offer34.java:37
MethodpathSum
(TreeNode root, int targetSum)
Code/leetcode/hotandtop/LeetCode437.java:20
MethodpathSum
(TreeNode root, int targetSum)
Code/leetcode/hotandtop/LeetCode113.java:17
MethodpathSum
(TreeNode root, int targetSum)
Code/leetcode/offer2/Offer050.java:13
MethodpathSumOptimized
(TreeNode root, int targetSum)
Code/leetcode/hotandtop/LeetCode437.java:42
Methodpermutation
(String s)
Code/leetcode/offer1/Offer38.java:20
Methodpermutation2
59ms 直接利用HashSet在回溯的时候去重
Code/leetcode/offer1/Offer38.java:48
Methodpermutation3
(String s)
Code/leetcode/offer1/Offer38.java:80
Methodpermute
(int[] nums)
Code/leetcode/hotandtop/LeetCode46.java:16
Methodpermute
(int[] nums)
Code/leetcode/normal/LeetCode0046.java:14
MethodpermuteUnique
(int[] nums)
Code/leetcode/hotandtop/LeetCode47.java:15
MethodpermuteUnique
(int[] nums)
Code/leetcode/normal/LeetCode0047.java:16
Methodping
(int t)
Code/leetcode/offer2/Offer042.java:20
MethodpivotIndex
(int[] nums)
Code/leetcode/offer2/Offer012.java:13
MethodpivotIndexOptimized
(int[] nums)
Code/leetcode/offer2/Offer012.java:31
MethodpivotIndexOptimized2
(int[] nums)
Code/leetcode/offer2/Offer012.java:48
Methodplay
()
Code/design/structural/adapter/JPMovieAdapter.java:17
Methodplay
()
Code/design/structural/adapter/clazz/JPMoviePlayerAdapter.java:16
MethodplayGame
()
Code/design/behavioral/state/MatchState.java:7
MethodplayGame
()
Code/design/behavioral/state/VocationState.java:7
MethodplayGame
()
Code/design/behavioral/state/BeafNodleState.java:8
MethodplusOne
(int[] digits)
Code/leetcode/normal/LeetCode0066.java:10
Methodpop2
()
Code/leetcode/datastructure/MinStack.java:64
Methodpop_front
()
Code/leetcode/datastructure/MaxQueue.java:41
MethodpostorderIteratively
后序遍历:非递归实现 迭代写法,利用pre记录上一个访问过的结点,与当前结点比较,如果是当前结点的子节点,说明其左右结点均已访问,将当前结点出栈,更新pre记录的对象。 变量pre用于保存当前栈顶所弹出的元素,判断 cur.right == pre是为了避免重复访问同一个元素而陷入死循环当中。 @p
Code/leetcode/datastructure/BinaryTree.java:188
MethodpostorderIteratively2
后序遍历:非递归实现 取巧方法,该写法的访问顺序并不是后序遍历,而是利用先序遍历“根左右”的遍历顺序,将先序遍历顺序更改为“根右左”,反转结果List,得到结果顺序为“左右根”。 @param root @param ans
Code/leetcode/datastructure/BinaryTree.java:217
MethodpostorderTraversal
给定一个二叉树,返回它的后序遍历。后序遍历根节点的左子树,后序遍历根节点的右子树,最后访问根节点。 @param root @return
Code/leetcode/datastructure/BinaryTree.java:162
MethodpostorderTraversal
(TreeNode root)
Code/leetcode/hotandtop/LeetCode145.java:13
MethodpreorderIteratively
前序遍历:非递归实现,推荐 @param root @param ans
Code/leetcode/datastructure/BinaryTree.java:50
MethodpreorderIteratively2
前序遍历:非递归实现,另一种写法 @param root @param ans
Code/leetcode/datastructure/BinaryTree.java:69
MethodpreorderTraversal
给定一个二叉树,返回它的前序遍历。先访问根节点,然后前序遍历左子树,再前序遍历右子树。 @param root @return List<Integer>
Code/leetcode/datastructure/BinaryTree.java:26
Methodproducemask
(int n, int m, Point[][] strategy)
Code/nowcoder/NC519.java:19
MethodproductExceptSelf
(int[] nums)
Code/leetcode/hotandtop/LeetCode238.java:12
MethodprotectedMe
()
Code/design/creatation/factory/abstractfactory/CommonMask.java:7
MethodprotectedMe
()
Code/design/creatation/factory/abstractfactory/N95Mask.java:11
MethodpruneTree
(TreeNode root)
Code/leetcode/offer2/Offer047.java:9
Methodpush2
辅助栈和数据栈不同步 (1)辅助栈为空的时候,必须放入新进来的数; (2)新来的数小于或者等于辅助栈栈顶元素的时候,才放入,特别注意这里“等于”要考虑进去,因为出栈的时候,连续的、相等的并且是最小值的元素要同步出栈; (3)出栈的时候,辅助栈的栈顶元素等于数据栈的栈顶元素,才出栈。 总结一下:出栈
Code/leetcode/datastructure/MinStack.java:57
Methodpush_back
(int value)
Code/leetcode/datastructure/MaxQueue.java:31
MethodqSort
快速排序 基本思路:快速排序每一次都排定一个元素(这个元素呆在了它最终应该呆的位置),然后递归地去排它左边的部分和右边的部分,依次进行下去,直到数组有序; 算法思想:分而治之(分治思想),与「归并排序」不同,「快速排序」在「分」这件事情上不想「归并排序」无脑地一分为二,而是采用了 partition
Code/leetcode/Sort/Sort.java:31
MethodquickSort
(int[] nums, int left, int right)
Code/leetcode/Sort/Sort2.java:14
MethodquickSort2
(int[] nums)
Code/leetcode/Sort/Sort2.java:43
MethodreadResolve
()
Code/others/Singleton.java:50
MethodremoveDuplicates
(int[] nums)
Code/leetcode/hotandtop/LeetCode26.java:9
MethodremoveNthFromEnd
(ListNode head, int n)
Code/leetcode/hotandtop/LeetCode19.java:11
MethodremoveNthFromEnd
(ListNode head, int n)
Code/leetcode/offer2/Offer021.java:9
MethodremoveNthFromEnd
(ListNode head, int n)
Code/leetcode/normal/LeetCode0019.java:14
MethodreorderList
(ListNode head)
Code/leetcode/offer2/Offer026.java:16
MethodrepeatedSubstringPattern
(String s)
Code/leetcode/hotandtop/LeetCode459.java:10
MethodreplaceSpace
(String s)
Code/leetcode/offer1/Offer5.java:9
Methodresgister
(String name)
Code/design/structural/facade/Police.java:5
MethodrestoreIpAddresses
(String s)
Code/leetcode/normal/LeetCode0093.java:15
MethodreverseBetween
(ListNode head, int m, int n)
Code/leetcode/hotandtop/LeetCode92.java:9
MethodreverseBits
(int n)
Code/leetcode/normal/LeetCode0190.java:9
MethodreverseKGroup
(ListNode head, int k)
Code/leetcode/normal/LeetCode0025.java:18
MethodreverseKGroupOptimized
(ListNode head, int k)
Code/leetcode/hotandtop/LeetCode25.java:51
MethodreverseLeftWords
(String s, int n)
Code/leetcode/offer1/Offer58_2.java:11
MethodreverseList
(ListNode head)
Code/leetcode/hotandtop/LeetCode206.java:9
MethodreverseList
(ListNode head)
Code/leetcode/offer2/Offer024.java:9
MethodreverseList
(ListNode head)
Code/leetcode/normal/LeetCode0206.java:17
MethodreverseList2
(ListNode head)
Code/leetcode/normal/LeetCode0206.java:33
MethodreversePairs
(int[] nums)
Code/leetcode/offer1/Offer51.java:11
MethodreversePrint
(ListNode head)
Code/leetcode/offer1/Offer6.java:17
MethodreverseWords
(String s)
Code/leetcode/offer1/Offer58_1.java:15
MethodreverseWords
(String s)
Code/leetcode/normal/LeetCode0151.java:13
MethodreverseWords2
(String s)
Code/leetcode/offer1/Offer58_1.java:24
MethodreverseWords2
(String s)
Code/leetcode/normal/LeetCode0151.java:20
MethodrightSideView
(TreeNode root)
Code/leetcode/offer2/Offer046.java:13
MethodrightSideView
(TreeNode root)
Code/leetcode/normal/LeetCode0199.java:20
MethodrightSideViewDfs
(TreeNode root)
Code/leetcode/offer2/Offer046.java:39
Methodrob
(int[] nums)
Code/leetcode/hotandtop/LeetCode198.java:12
Methodrob
(int[] nums)
Code/leetcode/normal/LeetCode0198.java:9
Methodrob
(int[] nums)
Code/leetcode/normal/LeetCode0213.java:9
MethodrobOptimized
(int[] nums)
Code/leetcode/hotandtop/LeetCode198.java:31
MethodromanToInt
(String s)
Code/leetcode/hotandtop/LeetCode13.java:11
← previousnext →1,201–1,300 of 1,445, ranked by callers