![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Medium
文章平均质量分 66
二喵棒棒哒
算法 大数据 区块链 硕士在读
github:https://github.com/zslomo
展开
-
Combination Sum题解
题干: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited number原创 2016-02-01 22:46:21 · 472 阅读 · 0 评论 -
Combination Sum II 题解
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combinatio原创 2016-02-06 18:18:51 · 464 阅读 · 0 评论 -
Combination Sum III 题解
题目:Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Ensure that numbers with原创 2016-02-10 13:57:45 · 398 阅读 · 0 评论 -
Word Search 题解
题目:Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically原创 2016-02-10 14:26:53 · 551 阅读 · 0 评论 -
3 sums题解
题干: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: Elements in a triplet (a,b,c) must原创 2016-01-31 21:34:50 · 447 阅读 · 0 评论 -
Implement Trie (Prefix Tree)
这里没有按照顺序更新,首先是因为做过了很多题,但是回头看看有些题解还是忘了,写博客是为了回顾,并且当初做题的时候有些题目自己不是很懂,网上找的要么乱七八糟要么是纯英文或者纯代码,看起来很费劲,所以想自己整理一下,也帮助后来者少走一些弯路 这道题是自己实现一个数据结构:trie,字典树,或者叫前缀树,很重要,并且在非中文的信息检索中应用广泛,但是大学期间却没有讲过,更不要提实现,而且可能很多同学跟我原创 2016-02-01 00:27:12 · 444 阅读 · 0 评论 -
4 sum题解(K sum)
题干: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: Elements in a原创 2016-02-01 21:30:37 · 764 阅读 · 0 评论 -
3Sum Closest题解
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly原创 2016-01-31 22:00:37 · 470 阅读 · 0 评论