463. Island Perimeter

Problem description:

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island doesn’t have “lakes” (water inside that isn’t connected to the water around the island). One cell is a square with side length 1. The grid is rectangular, width and height don’t exceed 100. Determine the perimeter of the island.

Readmore

206. Reverse Linked List

Problem description:

Reverse a singly linked list.

Readmore

252. Meeting Rooms

Problem description:

Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],…] (si < ei), determine if a person could attend all meetings.

Readmore

34. Find First and Last Position of Element in Sorted Array

Problem description:

Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.

Readmore

269. Alien Dictionary

Problem description:

There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty words from the dictionary, where words are sorted lexicographically by the rules of this new language. Derive the order of letters in this language.

Readmore

33. Search in Rotated Sorted Array

Problem description:

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.

Readmore

346. Moving Average from Data Stream

Problem description:

Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window.

Readmore

348. Design Tic-Tac-Toe

Problem description:

Design a Tic-tac-toe game that is played between two players on a n x n grid.

Readmore

785. Is Graph Bipartite?

Problem description:

Given an undirected graph, return true if and only if it is bipartite.

Readmore

211. Add and Search Word - Data structure design

Problem description:

Design a data structure that supports the following two operations:

Readmore