
数据结构与算法
文章平均质量分 78
小强的呼呼呼
机器学习爱好者
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
稳定排序和不稳定排序
https://www.cnblogs.com/codingmylife/archive/2012/10/21/2732980.html转载 2017-12-04 22:08:44 · 461 阅读 · 0 评论 -
回溯法题目总结
1. 数字键盘组合 17. Letter Combinations of a Phone Number class Solution { private static final String[] keys = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv&原创 2018-03-16 02:40:49 · 666 阅读 · 0 评论 -
数据结构-数组题总结
1. 二维数组中的查找 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 主要思路:利用二维数组的有序性,定向地搜索。 public class Solution { public boolean Find(int target, int [][] array) ...原创 2018-03-12 20:38:33 · 849 阅读 · 0 评论 -
双指针问题总结
双指针题目 1. 和为S的连续正数序列 思想: 设计前后两个指针以及一个用于保存当前和的变量 import java.util.ArrayList; public class Solution { public ArrayList<ArrayList<Integer> > FindContinuousSequence(int sum) { ...原创 2018-03-13 01:12:26 · 1136 阅读 · 0 评论 -
贪心法题目总结
1. 分饼干 Leetcode : 455. Assign Cookies (Easy) Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a gree...原创 2018-03-13 19:18:18 · 833 阅读 · 0 评论 -
链表题目总结
链表题目总结 1. 从尾到头打印链表 思路: 使用递归 import java.util.ArrayList; public class Solution { // 定义在外部,以防递归的时候被覆盖 ArrayList<Integer> ret = new ArrayList<>(); public ArrayList<Integ...原创 2018-03-14 00:48:52 · 434 阅读 · 0 评论 -
二叉树题目总结(Java版本)
二叉树总结 1. 重建二叉树 import java.util.*; public class Solution { public TreeNode reConstructBinaryTree(int [] pre,int [] in) { if(pre.length == 0||in.length == 0){ return nu...原创 2018-03-27 02:30:33 · 470 阅读 · 0 评论