链接:https://leetcode.com/problems/longest-common-prefix/#/description 难度:Easy 题目:14. Longest Common Prefix Writ…
分类:LeetCode
[LeetCode By Go 21]448. Find All Numbers Disappeared in an Array
题目 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others ap…
LeetCode --- 89. Gray Code
LeetCode — 89. Gray Code 题目 The gray code is a binary numeral system where two successive values differ …
69. Sqrt(x)
69. Sqrt(x) 题目 Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non…
LeetCode | Unique Paths II
题目: Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many …
274. H-Index
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to com…
221. Maximal Square
Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’…
748. Shortest Completing Word
Easy 属于没什么算法那种题,逻辑简单,注意下细节就没事了。 class Solution { public String shortestCompletingWord(String licensePlate, Str…
35. 搜索插入位置
35. 搜索插入位置 问题 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 示例 1: 输入: [1,3,5,6],…
Day.12 Sum of Square Numbers(633)
问题描述 Given a non-negative integer c, your task is to decide whether there’re two integers a and b such t…
[LeetCode] Ambiguous Coordinates 模糊的坐标
We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we remov…
【Leetcode】1. Two Sum 集合中找到两个元素之和等于给定值
1. 题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target…