摘要:
Problem Statement The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this patter 阅读全文
摘要:
Problem Statement Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: Input: 3 Output: [ 阅读全文
摘要:
Problem Statement Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input: [ [ 1, 2, 阅读全文
摘要:
Problem Statement You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of 阅读全文
摘要:
Problem Statement Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's 阅读全文
摘要:
Problem Statement Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph. Each node in the graph contain 阅读全文
摘要:
Problem Statement There are N children standing in a line. Each child is assigned a rating value. There are N children standing in a line. Each child 阅读全文
摘要:
Problem Statement Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. Given a range 阅读全文
摘要:
Problem Statement Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for t 阅读全文
摘要:
Problem Statement Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top 阅读全文