上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 64 下一页
摘要: (This problem is an interactive problem.) A binary matrix means that all elements are 0 or 1. For each individual row of the matrix, this row is sorte 阅读全文
posted @ 2020-04-23 10:52 CNoodle 阅读(1769) 评论(0) 推荐(0)
摘要: Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The r 阅读全文
posted @ 2020-04-22 01:13 CNoodle 阅读(460) 评论(0) 推荐(0)
摘要: Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length. Do not allocate extra s 阅读全文
posted @ 2020-04-22 00:39 CNoodle 阅读(446) 评论(0) 推荐(0)
摘要: Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the sa 阅读全文
posted @ 2020-04-21 12:13 CNoodle 阅读(712) 评论(0) 推荐(0)
摘要: Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice sub 阅读全文
posted @ 2020-04-21 07:58 CNoodle 阅读(921) 评论(0) 推荐(0)
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 阅读全文
posted @ 2020-04-20 06:39 CNoodle 阅读(464) 评论(0) 推荐(0)
摘要: Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the dig 阅读全文
posted @ 2020-04-20 06:21 CNoodle 阅读(472) 评论(0) 推荐(0)
摘要: Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the kth smallest element in the matrix. Note that it is 阅读全文
posted @ 2020-04-19 06:34 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with 阅读全文
posted @ 2020-04-17 06:02 CNoodle 阅读(226) 评论(0) 推荐(0)
摘要: You are given an image represented by an m x n grid of integers image, where image[i][j] represents the pixel value of the image. You are also given t 阅读全文
posted @ 2020-04-17 02:44 CNoodle 阅读(158) 评论(0) 推荐(0)
摘要: You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may 阅读全文
posted @ 2020-04-16 14:29 CNoodle 阅读(256) 评论(0) 推荐(0)
摘要: You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing a fresh orange, or 2 representi 阅读全文
posted @ 2020-04-16 13:13 CNoodle 阅读(240) 评论(0) 推荐(0)
摘要: Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Note: The number o 阅读全文
posted @ 2020-04-16 12:07 CNoodle 阅读(215) 评论(0) 推荐(0)
摘要: You are given a string s containing lowercase English letters, and a matrix shift, where shift[i] = [direction, amount]: direction can be 0 (for left 阅读全文
posted @ 2020-04-16 05:52 CNoodle 阅读(578) 评论(0) 推荐(0)
摘要: Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subs 阅读全文
posted @ 2020-04-16 03:03 CNoodle 阅读(426) 评论(0) 推荐(0)
摘要: Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Retu 阅读全文
posted @ 2020-04-16 02:40 CNoodle 阅读(439) 评论(0) 推荐(0)
摘要: Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise. A good subarray is a subarray where: its len 阅读全文
posted @ 2020-04-15 03:29 CNoodle 阅读(208) 评论(0) 推荐(0)
摘要: Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty seq 阅读全文
posted @ 2020-04-14 12:28 CNoodle 阅读(390) 评论(0) 推荐(0)
摘要: Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1: Input: nums = [0,1] Output: 阅读全文
posted @ 2020-04-14 10:12 CNoodle 阅读(234) 评论(0) 推荐(0)
摘要: You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choo 阅读全文
posted @ 2020-04-14 08:38 CNoodle 阅读(135) 评论(0) 推荐(0)
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 64 下一页