btan7645@gmail.com
New York, NY
Github | LinkedIn | Personal Site
Proficient: Javascript, Node.js, Express, React, React Native, Redux, PostgreSQL, HTML5, CSS, Sass, Git
btan7645@gmail.com
New York, NY
Github | LinkedIn | Personal Site
Proficient: Javascript, Node.js, Express, React, React Native, Redux, PostgreSQL, HTML5, CSS, Sass, Git
Given two sorted arrays of numbers, return an array containing all values that appear in both arrays. The numbers in the resulting array (the "intersection") may be returned in any order, they needn't be sorted.
You can assume that each array has only unique values (no duplicates within the array).
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit.
Note that you cannot sell a stock before you buy one.