题目如下: 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 ...
分类:
其他好文 时间:
2020-02-09 18:18:53
阅读次数:
52
题目如下: Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand. Example 1: Inp ...
分类:
其他好文 时间:
2020-02-09 18:15:29
阅读次数:
313
题目如下: Implement the class TweetCounts that supports two methods: 1. recordTweet(string tweetName, int time) Stores the tweetName at the recorded time ...
分类:
其他好文 时间:
2020-02-09 18:10:45
阅读次数:
50
Link class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { unordered_set<string> words; for(auto &s: ...
分类:
其他好文 时间:
2020-02-09 11:19:33
阅读次数:
67
Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other o ...
分类:
其他好文 时间:
2020-02-08 22:02:58
阅读次数:
86
[toc] ? 108. 将有序数组转换为二叉搜索树 https://leetcode cn.com/problems/convert sorted array to binary search tree/ 描述 解答 py 错在: Python没有三目运算符(?:),类函数不可调用 fix: 【t ...
分类:
其他好文 时间:
2020-02-08 13:30:48
阅读次数:
59
签到成功 只求week4不要交白卷 Crypto Exchange 题目: Our admin hijacked a secret channel and it looks like there are two teams doing some unspeakable transactions. n ...
分类:
其他好文 时间:
2020-02-08 09:57:02
阅读次数:
107
一、题目说明 题目是34. Find First and Last Position of Element in Sorted Array,查找一个给定值的起止位置,时间复杂度要求是Olog(n)。题目的难度是Medium! 二、我的解答 这个题目还是二分查找(折半查找),稍微变化一下。target ...
分类:
其他好文 时间:
2020-02-08 09:26:27
阅读次数:
56
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
1 """ 2 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. ...
分类:
其他好文 时间:
2020-02-07 18:47:24
阅读次数:
67