摘要:
There are n buildings in a line. You are given an integer array heights of size n that represents the heights of the buildings in the line. The ocean 阅读全文
摘要:
Some people will make friend requests. The list of their ages is given and ages[i] is the age of the ith person. Person A will NOT friend request pers 阅读全文
摘要:
Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to th 阅读全文
摘要:
Given a node from a Circular Linked List which is sorted in ascending order, write a function to insert a value insertVal into the list such that it r 阅读全文
摘要:
Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be 阅读全文
摘要:
Given an integer array arr, remove a subarray (can be empty) from arr such that the remaining elements in arr are non-decreasing. A subarray is a cont 阅读全文
摘要:
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 阅读全文
摘要:
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, 阅读全文