Howie66的博客

To be a life-long learner!

排序:
默认
按更新时间
按访问量

Leetcode 231 Power of Two

Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Inpu...

2018-12-10 12:15:25

阅读数:2

评论数:0

Leetcode 42 Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining...

2018-11-23 15:18:57

阅读数:27

评论数:0

Leetcode 41 First Missing Positive

Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] ...

2018-11-19 20:47:55

阅读数:25

评论数:0

Leetcode 40 Combination Sum II

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate num...

2018-11-12 10:58:33

阅读数:31

评论数:0

Leetcode 39 Combination Sum

Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the...

2018-11-12 10:54:58

阅读数:31

评论数:0

Leetcode 38 Count and Say

The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 1112...

2018-11-09 10:51:35

阅读数:36

评论数:0

Tomcat代码实现

最近开课学到了Tomcat,对这个挺感兴趣,就跟着网上的教程自己实现了一遍。 众所周知,Tomcat是一个满足Servlet规范的容器,在Java Web的项目中大量使用;一般来说,我们需要将Web应用打包成War文件部署到Tomcat服务器中,通过制定映射关系来制定路径,指明被哪个方法处理。To...

2018-11-08 23:28:13

阅读数:32

评论数:0

Leetcode 37 Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits ...

2018-11-06 21:01:57

阅读数:17

评论数:0

Leetcode 36 Valid Sudoku

Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the dig...

2018-11-06 20:59:41

阅读数:30

评论数:0

Leetcode 935 Knight Dialer

A chess knight can move as indicated in the chess diagram below:  .              This time, we place our chess knight on any numbered key of a pho...

2018-11-04 15:49:31

阅读数:78

评论数:0

Leetcode 933 Number of Recent Calls

Write a class RecentCounter to count recent requests. It has only one method: ping(int t), where t represents some time in milliseconds. Return the...

2018-11-04 11:54:36

阅读数:99

评论数:0

Leetcode 35 Search Insert Position

Example 1: Input: [1,3,5,6], 5 Output: 2 Example 2: Input: [1,3,5,6], 2 Output: 1 Example 3: Input: [1,3,5,6], 7 Output: 4 Example 4: I...

2018-11-01 20:07:20

阅读数:21

评论数:0

Leetcode 34 Find First and Last Position of Element in Sorted Array

Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime c...

2018-10-31 16:21:09

阅读数:20

评论数:0

Leetcode 33 Search in Rotated Sorted Array

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2])....

2018-10-30 09:53:03

阅读数:20

评论数:0

Leetcode 32 Longest Valid Parentheses

Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: In...

2018-10-29 16:49:09

阅读数:17

评论数:0

Leetcode 31 Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not poss...

2018-10-28 11:38:24

阅读数:21

评论数:0

Leetcode 30 Substring with Concatenation of All Words

You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conc...

2018-10-27 17:33:03

阅读数:21

评论数:0

Leetcode 29 Divide Two Integers

Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after divi...

2018-10-26 20:22:24

阅读数:19

评论数:0

Leetcode 28 Implement strStr()

Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: ha...

2018-10-25 15:47:42

阅读数:24

评论数:0

反转链表(递归与栈)

输入一个链表,反转链表后,输出新链表的表头。 1) 使用一个栈来实现: /* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val =...

2018-10-24 15:09:58

阅读数:16

评论数:0

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