码迷,mamicode.com
首页 >  
搜索关键字:leedcode    ( 225个结果
[leedcode 205] Isomorphic Strings
Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ...
分类:其他好文   时间:2015-08-04 00:31:12    阅读次数:108
[leedcode 204] Count Primes
Description:Count the number of prime numbers less than a non-negative number,n.public class Solution { public int countPrimes(int n) { //筛选...
分类:其他好文   时间:2015-08-04 00:15:09    阅读次数:95
[leedcode 206] Reverse Linked List
Reverse a singly linked list./** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int...
分类:其他好文   时间:2015-08-04 00:10:48    阅读次数:184
[leedcode 203] Remove Linked List Elements
Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --...
分类:其他好文   时间:2015-08-03 22:38:01    阅读次数:213
[leedcode 202] Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:移动开发   时间:2015-08-03 22:27:56    阅读次数:141
[leedcode 198] House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo...
分类:其他好文   时间:2015-08-03 22:23:48    阅读次数:201
[leedcode 201] Bitwise AND of Numbers Range
Given a range [m, n] where 0 m 1101 11111111 –>n 可以去掉的就是n的分割部分的1。 所以结果其实就是m和n公共头部*/ int res=0; if(m==0)return 0; ...
分类:其他好文   时间:2015-08-03 22:19:51    阅读次数:197
[leedcode 200] Number of Islands
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ...
分类:其他好文   时间:2015-08-03 22:19:33    阅读次数:113
[leedcode 199] Binary Tree Right Side View
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:其他好文   时间:2015-08-03 22:18:49    阅读次数:105
[leedcode 191] Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
分类:其他好文   时间:2015-08-03 22:16:35    阅读次数:144
225条   上一页 1 ... 6 7 8 9 10 ... 23 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!