04 2018 档案

摘要:出处: https://www.cnblogs.com/shindo/p/5579191.html 平时阅读一些远吗分析类文章或是设计应用架构时没少与UML类图打交道。实际上,UML类图中最常用到的元素五分钟就能掌握,下面赶紧来一起认识一下它吧: 一、类的属性的表示方式 在UML类图中,类使用包含类 阅读全文
posted @ 2018-04-20 07:17 davidnyc 阅读(355) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1... 阅读全文
posted @ 2018-04-16 23:52 davidnyc 阅读(134) 评论(0) 推荐(0)
摘要:需要和 LC.80.Remove Duplicates from Sorted Array II 对比参考 阅读全文
posted @ 2018-04-16 23:50 davidnyc 阅读(106) 评论(0) 推荐(0)
摘要:s3 是用来存放sort 结果的,整个算法非常像 selection sort/bubble sort 1: 每次从s1中选出最小的一个放在s3 中,其他非最小的放入s2 中 2: 然后把s2 的数字放回到s1 中 循环结束后,s3 中的就是sort 好的结果 阅读全文
posted @ 2018-04-06 07:57 davidnyc 阅读(780) 评论(0) 推荐(0)
摘要:Repeatedly remove all adjacent, repeated characters in a given string from left to right.No adjacent characters should be identified in the final string.Examples"abbbaaccz" → "aaaccz" → "ccz" → "z""aa... 阅读全文
posted @ 2018-04-06 04:51 davidnyc 阅读(496) 评论(0) 推荐(0)
摘要:Determine if a small string is a substring of another large string.Return the index of the first occurrence of the small string in the large string.Return -1 if the small string is not a substring of ... 阅读全文
posted @ 2018-04-06 03:40 davidnyc 阅读(203) 评论(0) 推荐(0)
摘要:Remove adjacent, repeated characters in a given string, leaving only one character for each group of such characters.AssumptionsTry to do it in place.Examples“aaaabbbc” is transferred to “abc”Corner C... 阅读全文
posted @ 2018-04-05 12:43 davidnyc 阅读(185) 评论(0) 推荐(0)
摘要:Given a string, remove all leading/trailing/duplicated empty spaces.Assumptions:The given string is not null.Examples:“ a” --> “a”“ I love MTV ” --> “I love MTV” 1 public String removeSpaces(... 阅读全文
posted @ 2018-04-05 12:14 davidnyc 阅读(298) 评论(0) 推荐(0)
摘要:Remove given characters in input string, the relative order of other characters should be remained. Return the new string after deletion.AssumptionsThe given input string is not null.The characters to... 阅读全文
posted @ 2018-04-05 09:05 davidnyc 阅读(167) 评论(0) 推荐(0)
摘要:Given an integer array of size N - 1, containing all the numbers from 1 to N except one, find the missing number.AssumptionsThe given array is not null, and N >= 1ExamplesA = {2, 1, 4}, the missing nu... 阅读全文
posted @ 2018-04-05 07:15 davidnyc 阅读(174) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/combination-sum-ii/description/Given a collection of candidate numbers (C) and a target number (T), find all unique comb 阅读全文
posted @ 2018-04-03 04:11 davidnyc 阅读(127) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/combination-sum/description/ Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all 阅读全文
posted @ 2018-04-03 02:51 davidnyc 阅读(122) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/combinations/description/Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], ... 阅读全文
posted @ 2018-04-03 00:27 davidnyc 阅读(107) 评论(0) 推荐(0)
摘要:Given a set of characters represented by a String, return a list containing all subsets of the characters.AssumptionsThere could be duplicate characters in the original set.​ExamplesSet = "abc", all t... 阅读全文
posted @ 2018-04-02 09:21 davidnyc 阅读(148) 评论(0) 推荐(0)
摘要:Given a string with no duplicate characters, return a list with all permutations of the characters. Examples Set = “abc”, all permutations are [“abc”, 阅读全文
posted @ 2018-04-02 05:56 davidnyc 阅读(180) 评论(0) 推荐(0)
摘要:same as LC.22. Generate Parentheseshttps://leetcode.com/problems/generate-parentheses/description/ Given N pairs of parentheses “()”, return a list wi 阅读全文
posted @ 2018-04-02 05:03 davidnyc 阅读(246) 评论(0) 推荐(0)
摘要:Given a number of different denominations of coins (e.g., 1 cent, 5 cents, 10 cents, 25 cents), get all the possible ways to pay a target number of ce 阅读全文
posted @ 2018-04-02 04:20 davidnyc 阅读(228) 评论(0) 推荐(0)
摘要:Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. For ex 阅读全文
posted @ 2018-04-01 22:34 davidnyc 阅读(161) 评论(0) 推荐(0)
摘要:Determine if the given integer array is min heap. 阅读全文
posted @ 2018-04-01 07:49 davidnyc 阅读(201) 评论(0) 推荐(0)