3Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.

angledark0123 發表在 痞客邦 留言(0) 人氣()

360. Sort Transformed Array

注意這題之所以變難是因為O(n),因為不能用sorting,不然會變成O(nlogn)

angledark0123 發表在 痞客邦 留言(0) 人氣()

通常用來detect loop,判斷從哪段開始有loop 

解法可以想像是龜兔賽跑,兔子兩倍速,烏龜一倍速前進

angledark0123 發表在 痞客邦 留言(0) 人氣()

 

162. Find Peak Element

angledark0123 發表在 痞客邦 留言(0) 人氣()

211. Add and Search Word - Data structure design

Design a data structure that supports the following two operations:

angledark0123 發表在 痞客邦 留言(0) 人氣()

在研究為什麼 List<List<Integer>> res = new ArrayList<>()

angledark0123 發表在 痞客邦 留言(0) 人氣()

442. Find All Duplicates in an Array

Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.

angledark0123 發表在 痞客邦 留言(0) 人氣()

134. Gas Station

angledark0123 發表在 痞客邦 留言(0) 人氣()

134. Gas Station

angledark0123 發表在 痞客邦 留言(0) 人氣()

71. Simplify Path

angledark0123 發表在 痞客邦 留言(1) 人氣()