摘要: 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 阅读全文
posted @ 2019-12-17 06:13 包子模拟面试 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 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: [ 阅读全文
posted @ 2019-12-10 15:10 包子模拟面试 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 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, 阅读全文
posted @ 2019-12-10 12:34 包子模拟面试 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-12-08 08:54 包子模拟面试 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-12-06 01:34 包子模拟面试 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-12-01 13:48 包子模拟面试 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-10-27 11:38 包子模拟面试 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-10-01 01:06 包子模拟面试 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-09-29 11:20 包子模拟面试 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-09-27 08:52 包子模拟面试 阅读(177) 评论(0) 推荐(0) 编辑