This file contains hidden or 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
Source for CEO data [2021] — https://aflcio.org/paywatch/highest-paid-ceos | |
Market cap data [2023] — Google Finance | |
Microsoft Corporation ($1920B)—Satya Nadella | |
Alphabet Inc. ($1209B)—Sundar Pichai | |
Adobe, Inc. ($163B)—Shantanu Narayen | |
International Business Machines Corporation ($122B)—Arvind Krishna | |
Vertex Pharmaceuticals Incorporated ($75B)—Reshma Kewalramani | |
Micron Technology, Inc. ($64B)—Sanjay Mehrotra | |
Cadence Design Systems, Inc. ($53B)—Anirudh Devgan |
This file contains hidden or 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
function mergeArray(array1, array2) { | |
const array = []; | |
while(array1.length > 0 || array2.length > 0){ | |
if (!array1.length) array.push(array2.shift()); | |
else if (!array2.length) array.push(array1.shift()); | |
else { | |
if (array1[0] > array2[0]) { | |
array.push(array2.shift()); | |
} else { |
This file contains hidden or 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
// This function will search min and max in an array. | |
function findMinMax(array) { | |
let min = +Infinity; | |
let max = -Infinity; | |
for (let i = 0; i <= array.length; i++) { | |
if (min > array[i]) { | |
min = array[i]; | |
} | |
if (max < array[i]) { |