标签: 算法
-
981-基于时间的键值存储
创建一个基于时间的键值存储类 TimeMap,它支持下面两个操作: set(string key, strin…
-
数据结构与算法之美(一)
首先看下上面的代码,执行的就是1-n的累加操作,从CPU的角度来看,每一行执行的操作都是类似的:读数据-运算-…
-
260. Single Number III
Given an array of numbers nums, in which exactly two el…
-
137. Single Number II
Given a non-empty array of integers, every element appe…
-
208. Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith me…
-
187. Repeated DNA Sequences
All DNA is composed of a series of nucleotides abbrevia…
-
209. Minimum Size Subarray Sum
Given an array of n positive integers and a positive in…
-
200. Number of Islands
Given a 2d grid map of ‘1’s (land) and ‘0’s (water), co…
-
201. Bitwise AND of Numbers Range
Given a range [m, n] where 0 <= m <= n <= 2147…
-
5. Longest Palindromic Substring
Given a string s, find the longest palindromic substrin…