744. Find Smallest Letter Greater Than Target

Problem description:

Given a characters array letters that is sorted in non-decreasing order and a character target, return the smallest character in the array that is larger than target.

Readmore

361. Bomb Enemy

Problem description:

Given an m x n matrix grid where each cell is either a wall 'W', an enemy 'E' or empty '0', return the maximum enemies you can kill using one bomb. You can only place the bomb in an empty cell.

Readmore

465. Optimal Account Balancing

Problem description:

You are given an array of transactions transactions where transactions[i] = [fromi, toi, amounti] indicates that the person with ID = fromi gave amounti $ to the person with ID = toi.

Readmore

432. All O(1) Data Structure

Problem description:

Design a data structure to store the strings’ count with the ability to return the strings with minimum and maximum counts.

Readmore

36. Valid Sudoku

Problem description:

Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:

Readmore

671. Second Minimum Node In a Binary Tree

Problem description:

Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node’s value is the smaller value among its two sub-nodes. More formally, the property root.val = min(root.left.val, root.right.val) always holds.

Readmore

367. Valid Perfect Square

Problem description:

Given a positive integer num, write a function which returns True if num is a perfect square else False.

Readmore

802. Find Eventual Safe States

Problem description:

We start at some node in a directed graph, and every turn, we walk along a directed edge of the graph. If we reach a terminal node (that is, it has no outgoing directed edges), we stop.

Readmore

841. Keys and Rooms

Problem description:

There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room.

Readmore

265. Paint House II

Problem description:

There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. You have to paint all the houses such that no two adjacent houses have the same color.

Readmore