You are given a string ss. Each character is either 0 or 1. You want all 1's in the string to form a contiguous subsegment. For example, if the string ...
分类:
其他好文 时间:
2020-02-13 13:12:48
阅读次数:
61
LeetCode 0141. Linked List Cycle环形链表【Easy】【Python】【双指针】 题目 "英文题目地址" Given a linked list, determine if it has a cycle in it. To represent a cycle in th ...
分类:
编程语言 时间:
2020-02-13 12:52:02
阅读次数:
65
F. Three Paths on a Tree Description You are given an unweighted tree with nn vertices. Recall that a tree is a connected undirected graph without cyc ...
分类:
其他好文 时间:
2020-02-13 09:54:10
阅读次数:
72
Given an array of integers arr and two integers k and threshold. Return the number of sub-arrays of size k and average greater than or equal to thresh ...
分类:
其他好文 时间:
2020-02-13 09:42:29
阅读次数:
54
Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand. Example 1: Input: ho ...
分类:
其他好文 时间:
2020-02-13 09:30:42
阅读次数:
57
Given a m * n matrix mat of ones (representing soldiers) and zeros (representing civilians), return the indexes of the k weakest rows in the matrix or ...
分类:
其他好文 时间:
2020-02-13 00:00:55
阅读次数:
85
LeetCode 0088. Merge Sorted Array合并两个有序数组【Easy】【Python】【双指针】 题目 "英文题目链接" Given two sorted integer arrays nums1 and nums2 , merge nums2 into nums1 as o ...
分类:
编程语言 时间:
2020-02-12 23:50:19
阅读次数:
89
Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwis ...
分类:
其他好文 时间:
2020-02-12 18:20:39
阅读次数:
64
更多LeetCode解题详解 Easy Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 * M). More ...
分类:
其他好文 时间:
2020-02-12 00:59:17
阅读次数:
85
1 """ 2 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. 3 Exa ...
分类:
其他好文 时间:
2020-02-12 00:58:45
阅读次数:
82