Created
January 4, 2018 07:19
-
-
Save jianminchen/0f5c0f34450970ac116977cf357bcb8c to your computer and use it in GitHub Desktop.
need to go over those questions and then figure out things to work on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
given 2 vectors with multiple repitions, calc dot product, and create a data structure [2, 1,1 , 1] , [2, 1, 1, 1], [2 *2, 1* 1, 1 * 1, 1 * 1] -> dot product | |
[2,1 (a million times)] | |
[1, 2, 1000,000, 100,000 + 1] -> binary search -> | |
[(1,2), (million, 1)] <- new ds (1, 2), (2, 1), ..., (1000,000, 1) | |
typedef struct pair{ | |
int value; | |
int amount; | |
}Pair; | |
int dotProduct(Pair v1[], Pair v2[]){ | |
// write this function | |
} | |
given two vectors which are sparse, calc dot product, and create a data structure | |
three sum to a target in an array -> | |
you are given a bunch of tasks, and a int k | |
ABAA k = 3 | |
when you complete the tasks, you must complete the tasks in order, but when you schedule a new task, the same task type cannot exist in the past k slots. if it does, you must wait and try again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment