摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
第二题 给两个数组,两个数组中的元素都是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, 阅读全文
摘要:
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 阅读全文
摘要:
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- 阅读全文
摘要:
第一题一个四位数的密码锁,初始状态为0000, 输入解锁密码,返回最少多少个move可以解开。热身题,考虑几个异常输入即可。 比如说输入 1111, 结果是4输入0000, 结果是0 输入9999, 结果是4 就是算一下每一位input算 Math.Min(input - '0', '9' - in 阅读全文
摘要:
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 阅读全文
摘要:
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. 阅读全文