随笔分类 - leetcode
摘要:Excel Sheet Column NumberRelated to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column ...
阅读全文
摘要:Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B ...
阅读全文
摘要:Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the larg...
阅读全文
摘要:Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may ass...
阅读全文
摘要:Word BreakGiven a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words....
阅读全文
摘要:Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig...
阅读全文
摘要:Climbing StairsYou are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct way...
阅读全文
摘要:Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.python code:class Solution: # @par...
阅读全文
摘要:Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.python code:class Solution: # @param {integ...
阅读全文
摘要:Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the followin...
阅读全文
摘要:Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and ...
阅读全文
摘要:Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl...
阅读全文
摘要:Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as000000101001010000011110100111...
阅读全文

浙公网安备 33010602011771号