自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

转载 Backtracking questions

下面列举了几种可以用backtracking算法解决的问题。第一题subset的解法可以作为基本框架,其他的题目都是在该框架上做少量修改。SubsetsLeetcode 78 Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain du

2016-09-26 02:50:06 252

原创 Recursion

if a recursive call starts at most one other, we call this a linear recursion;if a recursive call may start two others, we call this a binary recursion;if a recursive call may start three or more oth

2016-09-25 12:47:20 381

原创 java.io.File中一些函数的学习

Examplepublic static long diskUsage(File root){ long total = root.length(); if(root.isDirectory()){ for(String childname: root.list()){ File child = new File(root, childname

2016-09-25 11:56:39 245

原创 数据结构学习笔记 —— 链表

单链表Singly Linked Listhead: 指向表头 tail: 指向表尾 size: 记录链表结点(insert/delete是要注意修改)单链表中直接删除最后一个元素必须要遍历链表,因为要找到链尾前一个结点,设置该结点的next为null。创建单链表class的时候,把结点类作为内置类。 This design allows Java to differentiate this n

2016-09-25 08:24:15 307

原创 Lc 2 - Add Two Numbers

DescriptionYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it

2016-09-21 05:22:11 209

原创 Lc1 - Two sum

DescriptionGiven an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution.ExampleGiven nums = [

2016-09-21 00:42:28 333

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-09-20 12:25:10 144

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除