DiamondI's blog

Categories · Algorithm

Home

About

Archives

LeetCode - 934. Shortest Bridge

934. Shortest Bridge Description In a given 2D binary array A, there are two islands. (An island is a 4-directionally connected group of 1s not connected to any other 1s.)

Read more

300. Longest Increasing Subsequence

300. Longest Increasing Subsequence Description Given an unsorted array of integers, find the length of longest increasing subsequence. (For this question, it’s stricly increasing.)

Read more

284. Peeking Iterator

LeetCode 284. Peeking Iterator Description Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation – it essentially peek() at the element that will be returned by the next call to next().

Read more

215. Kth Largest Element in an Array

215. Kth Largest Element in an Array Description Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.

Read more

155. Min Stack

155. Min Stack Description Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. top() – Get the top element. getMin() – Retrieve the minimum element in the stack.

Read more
123