11 2019 档案
摘要:You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell there is a server and 0 means that
阅读全文
摘要:On a plane there are n points with integer coordinates points[i] = [xi, yi]. Your task is to find the minimum time in seconds to visit all points. You
阅读全文
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: 题
阅读全文
摘要:Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t
阅读全文
摘要:Ants Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 33420 Accepted: 12441 Description An army of ants walk on a horizontal pole of length
阅读全文
摘要:In a gold mine grid of size m * n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. Return the ma
阅读全文
摘要:Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d
阅读全文
摘要:Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Example 1: Ex
阅读全文
摘要:torch.narrow(input, dim, start, length) → Tensor Returns a new tensor that is a narrowed version of input tensor. The dimension dim is input from star
阅读全文
摘要:repeat(*sizes) → Tensor Repeats this tensor along the specified dimensions. Unlike expand(), this function copies the tensor’s data. WARNING torch.rep
阅读全文
摘要:Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of students not standing in the right po
阅读全文
摘要:Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of
阅读全文
摘要:Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. Examp
阅读全文
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar
阅读全文
摘要:Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri,
阅读全文