自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (5)
  • 收藏
  • 关注

原创 leetcode8. String to Integer (atoi)

题目Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible inpu

2017-06-25 11:49:29 264

原创 leetcode 6. ZigZag Conversion

题目The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L

2017-06-24 10:44:11 202

原创 leetcode 3. Longest Substring Without Repeating Characters

题目Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b"

2017-06-23 11:41:34 211

原创 算法概论课后8.9

题目:给定一组集合{S1,S2,S3,…,Sn}和预算b,求一个集合H,其中H和所有Si相交且H的规模不超过b,前提是这个集合存在。求证该问题是NP完全问题 证明假设有一个图G(V,E),则把该图的每一条边对应一个集合Si,边上的两个点即该集合的元素,即每个集合有两个元素,如S1={v1,v2},这样一来,就能构造出|E|个集合。求图G的最小顶点覆盖问题,可以转化成求这|E|个集合

2017-06-21 11:50:06 227

原创 leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal

1.题目Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree2.思路递归.每次从后续遍历最后得到root,然后根据前序分割left tree和right tr

2017-06-03 11:46:40 164

原创 leetcode 96. Unique Binary Search Trees

1.题目Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1

2017-06-03 10:26:27 163

原创 leetcode 151. Reverse Words in a String

1.题目Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".2.思路可以考虑先对整个字符串反转,然后对其中的每个word反转,或者倒过来,先对每个word反转,然后对整个字符串反转

2017-06-01 13:48:11 211

原创 leetcode 522. Longest Uncommon Subsequence II

一。题目Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this s

2017-06-01 13:12:50 587

原创 leetcode 17. Letter Combinations of a Phone Number

1.题目Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digi

2017-05-27 21:21:33 138

原创 leetcode583. Delete Operation for Two Strings

题目Given two words word1 and word2, find the minimum number of steps required to makeword1 and word2 the same, where in each step you can delete one character in either string.Example 1:Inp

2017-05-21 13:17:03 342

原创 leetcode392. Is Subsequence

题目Given a string s and a string t, check if s is subsequence of t.You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) string,

2017-05-15 13:28:35 158

原创 leetcode55. Jump Game

题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you a

2017-05-08 17:55:55 156

原创 leetcode516. Longest Palindromic Subsequence

题目Given a string s, find the longest palindromic subsequence’s length in s. You may assume that the maximum length of s is 1000.Example 1: Input:“bbbab”Output:4One possible longest palindromic subsequ

2017-04-24 20:00:32 335

原创 leetcode322. Coin Change

题目You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money

2017-04-15 17:03:07 166

原创 leetcode523. Continuous Subarray Sum

题目Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up to

2017-04-09 11:46:38 244

原创 算法:LeetCode5. Longest Palindromic Substring

题目Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example: Input: "babad" Output: "bab" Note: “aba” is also a valid answer.Ex

2017-04-02 16:57:15 302

原创 算法:402. Remove K Digits

题目Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note:The length of num is less than 10002 and will be ≥ k.Th

2017-03-25 12:05:48 260

原创 算法:LeetCode207 Course Schedule

题目There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pai

2017-03-19 23:57:46 256

原创 算法:LeetCode240

题目Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted in ascending from left to right. Integers i

2017-03-05 10:18:06 307

原创 算法:LeetCode215

题目215 . Kth Largest Element in an ArrayFind the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Given [

2017-02-26 20:36:52 291

原创 Android学习一——动态添加组件与删除,可见性设置,imagebutton简单使用

一、动态添加组件在布局为水平线性布局的情况下,添加的布局会直接加在后面,这里只是简单介绍添加布局的方法取到上下文,取到要添加组件的布局,new一个要添加的组件,设置组件相关属性,添加组件。// 动态添加textviewmcontext = this;mlinearlayout = (LinearLayout) findViewById(R.id.LinearLayout1);mte

2015-01-26 13:26:16 2361

原创 安卓文件读取

private void viewfile(String path) { StringBuffer buff = new StringBuffer(); BufferedReader reader; String str = null; str=new File(path).getName(); buff.append("name: "+str+"\n")

2014-12-01 15:01:03 369

生物序列分析

生物序列分析经典教材

2016-12-09

Android开发SharedPreferences使用及调用文件管理器自定义读取文件实现

SharedPreferences 保存读取数据, 使用AutoCompleteTextView 和SharedPreferences 实现历史记录提示。调用文件管理器自定义路径读取文件

2014-12-01

Android开发用SQLite增删改查及自定义对话框

使用SQLite 数据库保存数据。会对SQLite 数据库里的数据进行增删改查等操作. 简单地自定义对话框

2014-12-01

android开发实现简单的音乐播放器

简单地实现播放器功能。使用MediaPlayer,简单的多线程编程,使用Handler 更新UI,简单的多线程编程,使用Handler 更新UI,使用Service 与Activity 进行通信

2014-12-01

无符号大数计算

用于计算无符号大整数加减乘除的计算,有界面进行提示输入,操作简单

2013-05-05

空空如也

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

TA关注的人

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