上一页 1 2 3 4 5 6 7 8 9 10 ··· 54 下一页
摘要: Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we tak 阅读全文
posted @ 2021-03-14 00:48 北叶青藤 阅读(58) 评论(0) 推荐(0)
摘要: Given three integer arrays arr1, arr2 and arr3 sorted in strictly increasing order, return a sorted array of only the integers that appeared in all th 阅读全文
posted @ 2021-03-13 14:26 北叶青藤 阅读(83) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, find the maximum average value of any subtree of that tree. (A subtree of a tree is any node of that tree plus all it 阅读全文
posted @ 2021-03-13 13:42 北叶青藤 阅读(150) 评论(0) 推荐(0)
摘要: 第二题 给两个数组,两个数组中的元素都是pair<int, int>,数组表示压缩后的一串数字 A: [(1, 2), (3,1), (2,3), (3, 1)] 表示 {1, 1, 3, 2, 2, 2, 3} B: [(5, 1), (1,1), (3,4), (2, 1)] 表示 {5, 1, 阅读全文
posted @ 2021-03-13 10:52 北叶青藤 阅读(83) 评论(0) 推荐(0)
摘要: A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possibl 阅读全文
posted @ 2021-03-13 08:13 北叶青藤 阅读(52) 评论(0) 推荐(0)
摘要: Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top-left to bottom- 阅读全文
posted @ 2021-03-13 07:13 北叶青藤 阅读(38) 评论(0) 推荐(0)
摘要: 第一题一个四位数的密码锁,初始状态为0000, 输入解锁密码,返回最少多少个move可以解开。热身题,考虑几个异常输入即可。 比如说输入 1111, 结果是4输入0000, 结果是0 输入9999, 结果是4 就是算一下每一位input算 Math.Min(input - '0', '9' - in 阅读全文
posted @ 2021-03-13 06:57 北叶青藤 阅读(113) 评论(0) 推荐(0)
摘要: From any string, we can form a subsequence of that string by deleting some number of characters (possibly no deletions). Given two strings source and  阅读全文
posted @ 2021-03-13 04:56 北叶青藤 阅读(82) 评论(0) 推荐(0)
摘要: You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. 阅读全文
posted @ 2021-03-13 03:52 北叶青藤 阅读(26) 评论(0) 推荐(0)
摘要: Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o 阅读全文
posted @ 2021-03-12 14:30 北叶青藤 阅读(91) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 54 下一页