上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页
摘要: Question:Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ...... 阅读全文
posted @ 2015-07-13 21:25 Maydow 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Question:Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume tha... 阅读全文
posted @ 2015-07-13 20:49 Maydow 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Question:Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For examp... 阅读全文
posted @ 2015-07-13 20:31 Maydow 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Question:Given an integern, return the number of trailing zeroes inn!.1、题型分类:2、思路:寻找n!后面的0的个数,即有多少个2*5,从而需要寻找里面总共有多少个2和多少个5,2肯定比5多,则只要找出5的个数即可。n/5是从n/... 阅读全文
posted @ 2015-07-13 20:25 Maydow 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Question:Rotate an array ofnelements to the right byksteps.For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4].1、题型分类:... 阅读全文
posted @ 2015-07-13 19:58 Maydow 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Question:Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100)... 阅读全文
posted @ 2015-07-13 19:37 Maydow 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-13 18:59 Maydow 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-13 18:49 Maydow 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-13 16:39 Maydow 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 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 --... 阅读全文
posted @ 2015-07-13 16:19 Maydow 阅读(114) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页