Skip to content

Instantly share code, notes, and snippets.

View hbarve1's full-sized avatar
🏠
Working from home

Himank Barve hbarve1

🏠
Working from home
View GitHub Profile
@hbarve1
hbarve1 / ceos.txt
Created February 18, 2023 06:17 — forked from deedy/ceos.txt
Indian-Origin CEOs of public companies [2023]
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
@hbarve1
hbarve1 / mergeSortedArray.js
Created August 31, 2021 08:30
Merge two sorted array of integers to one array sorted array.
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 {
@hbarve1
hbarve1 / findMinMax.js
Last active August 31, 2021 08:31
Find Min & Max numbers in an Array
// 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]) {