题目如下: Given a m * n matrix mat of ones (representing soldiers) and zeros (representing civilians), return the indexes of the k weakest rows in the mat ...
分类:
其他好文 时间:
2020-02-08 15:55:21
阅读次数:
68
题目如下: Given an array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of t ...
分类:
其他好文 时间:
2020-02-08 15:25:57
阅读次数:
69
Given a string s and an integer k, find out if the given string is a K-Palindrome or not. A string is K-Palindrome if it can be transformed into a pal ...
分类:
其他好文 时间:
2020-02-08 10:14:38
阅读次数:
74
This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed grap ...
分类:
其他好文 时间:
2020-02-08 09:31:18
阅读次数:
79
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E ...
分类:
其他好文 时间:
2020-02-08 00:01:55
阅读次数:
97
1 """ 2 Given a linked list, remove the n-th node from the end of list and return its head. 3 Example: 4 Given linked list: 1->2->3->4->5, and n = 2. ...
分类:
其他好文 时间:
2020-02-07 20:26:51
阅读次数:
78
1、题目 53. Maximum Subarray——Easy Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum a ...
分类:
其他好文 时间:
2020-02-07 20:25:50
阅读次数:
71
1 """ 2 Given a sorted linked list, delete all duplicates such that each element appear only once. 3 Example 1: 4 Input: 1->1->2 5 Output: 1->2 6 Exam ...
分类:
其他好文 时间:
2020-02-07 19:14:50
阅读次数:
70
调用多次readN,所以要重复使用internal buffer """ The read4 API is already defined for you. @param buf, a list of characters @return an integer def read4(buf): # B ...
分类:
其他好文 时间:
2020-02-07 18:42:43
阅读次数:
71
1 """ 2 Given a linked list, swap every two adjacent nodes and return its head. 3 You may not modify the values in the list's nodes, only nodes itself ...
分类:
其他好文 时间:
2020-02-07 18:27:44
阅读次数:
58