07 2018 档案
摘要:c++代码 判断两个线段是否重复。 fast-rcnn目标检测中nms代码中有这个代码段:) Implement a MyCalendar class to store your events. A new event can be added if adding the event will no
阅读全文
摘要:这是leetcode邮件推送的题目,bug-free的代码还是需要debug一段时间的 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follo
阅读全文
摘要:565. Array Nesting A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {
阅读全文
摘要:柠檬水🍋找零问题,有5 10 20三种面值。解法:能用10元找零就不用5块。 At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one
阅读全文
摘要:判断一棵树里是否有两个节点的值之和等于某个值。 653. Two Sum IV - Input is a BST Given a Binary Search Tree and a target number, return true if there exist two elements in th
阅读全文
摘要:这是程序员面试金典里面的一个题目。判断B是否是A旋转得到的,只要判断B是否是A+A的字串即可。
阅读全文
摘要:We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in the linked
阅读全文
摘要:Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th
阅读全文
摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate
阅读全文
摘要:Implement a MapSum class with insert, and sum methods. For the method insert, you'll be given a pair of (string, integer). The string represents the k
阅读全文
摘要:找规律 1,2,... , n 乱序排列,相邻数据的绝对差最多有n-1种 比如1,2,3,4,5对应于 1 5 2 4 3 python代码 python 代码 答案 Approach #2: Construction [Accepted] Intuition When k = n-1, a val
阅读全文
摘要:动态规划 空间复杂度 min(O(m),O(n)) python 代码
阅读全文

浙公网安备 33010602011771号