一共两个题findMinHealth, 一个游戏,输入一个数列代表每关要掉的血🩸,还有一个值表示一个只能用一次的可以挡最高伤害的盾,要求过完全部关后还要留一滴血。求游 ...
題目 packBlock給一整數列,第 i 個數代表第 i 個block的寬度 每個block的維度都是 1 x 寬度給一整數代表可用的row的數量,每一row無限長,可以容納 1 x 無限長的物 ...
请教大家一道经典题。sorted array after rotation. return the starting index for the minimum element. [1,1,1,1,1,1] -> 0[1,1,1,2,1,1] -> 4谢谢各位大佬。
昨天面了一道题,感觉自己可能理解有问题,或者是没有问清楚,到现在也没有想清楚该怎么实现,请教各位大佬。给你一个固定大小的memory buffer,比如4MB,让实现2个动 ...
題:給n 個有序數組,每個數組有n個數,一共n^2個數,輸出其中n個最小的數例:S1 = [0,4,19,20] S2 =[1,45,67,99] S3= [2,3,17,19] S4=[11,21,31,41] 輸出 S = [0,1,2,3 ...
問題There are N items to be printed on receipt, the i-th item has Item characters. A item must be printed on a single line, and can't change the item printing ...
本人小白,刷这道题时只想到暴力法,请问有没有什么好办法能够降低复杂度呢?先谢谢了!
QA岗的onsite,考的大部分题都是easy难度 比较容易有一轮和面试官沟通不太顺畅 题也没完全写出来,题目如下:给定一个连续整数list,如[1, 5000],删除其中所有含有数 ...
如题,怎么可以证明他有环呢感觉大家可以用这个解法怎么去理解呢:
这是一道oa题,弱弱问一句这题应该怎么做。。目前没有什么思路,做出来加米!
今天在解题时想到这样的题目: 就像是 House robbery ( with k distance 版本), Select top 3 numbers from an unsorted list with min k distance, return maxSum or re ...
题目:find magic number (1) find a magic number that A = i in a sorted array (monotonic increasing order), return the smallest magic number (index). return -1 ...
今天电面,一开始问的是传统的回文序列题,解出来以后,面试官话锋一变,问:“假设你开一个专门帮用户解答‘是否是回文序列’的网站。结果你做得太好了引来很多同行攻击 ...
Given an array of numbers of size N (a large number, say N=1000000), find out the largest product of n-number of adjacent numbers (n
如题,求指点,这怎么做?
题目如下:Given an array ,divide this array into k possible subsets and find the maximum sum of these subsets ,and from these sum find the minimum among all? ...
在准备oa,看到这道题(图片已附件)...比较懵。请教各位~感谢!我大米少的可怜。见谅
有Bug输入数据: [2, 1, 3, 2, 1, 2, 3, 2]为什么输出是3 不应该是2吗?https://leetcode.com/problems/majority-element/description/https://leetcode-cn.co ...
做OA的时候遇到了一道题给定一个二维数组, 每个物体可以从八个方向连接,计算所有形成的物体的周长和。case1input:0 0 0 0 01 0 0 0 01 1 0 0 00 0 0 ...
Given an array of integers, for each of them, find the index of the second number to its right that's larger and return the resulting array of indices. If there ...