摘要: 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 北叶青藤 阅读(66) 评论(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 北叶青藤 阅读(138) 评论(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 北叶青藤 阅读(74) 评论(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 北叶青藤 阅读(43) 评论(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 北叶青藤 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 第一题一个四位数的密码锁,初始状态为0000, 输入解锁密码,返回最少多少个move可以解开。热身题,考虑几个异常输入即可。 比如说输入 1111, 结果是4输入0000, 结果是0 输入9999, 结果是4 就是算一下每一位input算 Math.Min(input - '0', '9' - in 阅读全文
posted @ 2021-03-13 06:57 北叶青藤 阅读(90) 评论(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 北叶青藤 阅读(68) 评论(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 北叶青藤 阅读(17) 评论(0) 推荐(0) 编辑