-
https://leetcode.com/problems/car-fleet/ N cars are going to the same destination along a one lane road. The destination is target ...
-
-
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate ext...
-
Related: Minimum cost to reach a point N from 0 with two different operations allowed https://leetcode.com/problems/reach-a-number/ You...
-
毒酒问题---1000桶酒,其中1桶有毒。而一旦吃了,毒性会在1周后发作。问最少需要多少只老鼠可在一周内找出毒酒 如对1000桶按1~1000编码,需要10位二进制数。 因此只需要取10只老鼠,每只老鼠只喝其对应位数为1的编号的酒。 即10只老鼠按以下编码: 第一只...
-
随机的力量(2) - 矩阵比较 最直接的想法,当然是先进行矩阵乘法得到矩阵D = A×B,然后再一一比较矩阵C和矩阵D是否相同? 比较两个n×n矩阵是否相同的时间复杂度为O(N^2),而矩阵乘法直接算法时间复杂度是O(N^3), 目前最快的矩阵乘法的时间复杂度是O(N^...
-
Uber-NY Onsite "噢你很懂design?"【一亩三分地论坛面经版】 - Powered by Discuz! 1,常见题-Design spotify,主要在问playlist和shuffle list功能。 >player,play...
-
Maximum sum of distinct numbers with LCM as N - GeeksforGeeks Given a number N, the task is to find out maximum sum of distinct numbers su...
-
https://windsuzu.github.io/leetcode-620/ X city opened a new cinema, many people would like to go to this cinema. The cinema also gives ou...
-
Data Structures and Algorithm: Distributed doubly linked list sum You are given a doubly linked list whose nodes are distributed. Every ...