Tiger's leetcode solution

Wednesday, March 11, 2015

174. Dungeon Game ------hard ~~~~~~~~~~

›
The demons had captured the princess and imprisoned her in  the bottom-right corner  of a  dungeon . The  dungeon  consists of  m x n  rooms...
Tuesday, March 10, 2015

157. Read N Characters Given Read4 -----E

›
Given a file and assume that you can only read the file using a given method  read4 , implement a method to read n characters.   Method...

Number of 1 Bits

›
Q: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight ). For ...
Monday, March 9, 2015

153. Find Minimum in Rotated Sorted Array

›
Q: Suppose a sorted array 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 ). Find t...

158. Read N Characters Given Read4 II - Call multiple times --------H

›
Given a file and assume that you can only read the file using a given method  read4 , implement a method read to read n characters. Your m...
Sunday, March 8, 2015

190. Reverse Bits (easy)

›
Q: Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 001110010111100000101...
Saturday, March 7, 2015

159. Longest Substring with At Most Two Distinct Characters ----M

›
Given a string s , find the length of the longest substring  t   that contains at most 2 distinct characters. Example 1: Input: "...
‹
›
Home
View web version

About Me

Tiger
View my complete profile
Powered by Blogger.