随笔分类 - LeetCode
摘要:Integer to Roman (M) 题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500
阅读全文
摘要:Bulls and Cows (E) 题目 You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what th
阅读全文
摘要:H-Index (M) 题目 Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-i
阅读全文
摘要:Missing Number (E) 题目 Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1:
阅读全文
摘要:Palindrome Number (E) 题目 Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example
阅读全文
摘要:String to Integer (atoi) (M) 题目 Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as nec
阅读全文
摘要:House Robber II (M) 题目 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All hous
阅读全文
摘要:House Robber (E) 题目 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only co
阅读全文
摘要:Repeated DNA Sequences (M) 题目 All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying D
阅读全文
摘要:Reverse Integer (E) 题目 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -
阅读全文
摘要:ZigZag Conversion (M) 题目 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this
阅读全文
摘要:Median of Two Sorted Arrays (H) 题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays.
阅读全文
摘要:Longest Substring Without Repeating Characters (M) 题目 Given a string, find the length of the longest substring without repeating characters. Example 1
阅读全文
摘要:Add two numbers (M) 题目 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and eac
阅读全文
摘要:Two Sum (E) 题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each inpu
阅读全文
摘要:Longest Palindromic Substring (M) 题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 100
阅读全文

浙公网安备 33010602011771号