随笔分类 - LeetCode
摘要:Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist.
阅读全文
摘要:Given an unsorted integer array, find the first missing positive integer. Given an unsorted integer array, find the first missing positive integer. Gi
阅读全文
摘要:Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Clarification What's the de
阅读全文
摘要:Given two rectangles, find if the given two rectangles overlap or not. Notice l1: Top Left coordinate of first rectangle.r1: Bottom Right coordinate o
阅读全文
摘要:There is a stone game.At the beginning of the game the player picks n piles of stones in a line. The goal is to merge the stones in one pile observing
阅读全文
摘要:Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc
阅读全文
摘要:Given a set of words without duplicates, find all word squares you can build from them. A sequence of words forms a valid word square if the kth row a
阅读全文
摘要:Given an integer n, return the number of trailing zeroes in n!. Example 1: Input: 3 Output: 0 Explanation: 3! = 6, no trailing zero. Example 2: Input:
阅读全文
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag
阅读全文

浙公网安备 33010602011771号