- Programing languages and framework
- NodeJs
- JavaScript/TypeScript
- Express.js
- Database
- Amazon s3
- Services
- Amazon Kinesis
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
const arr = [[[1, 2], 3], [4], [5, 6], [7, [8, 9]]]; | |
const convertFlat = (arr = []) => arr.flat(Infinity); | |
const convertFlatSome = (arr = []) => | |
arr.some(Array.isArray) ? convertFlatSome(arr.flat(1)) : arr; | |
const convertFlatToStringMap = (arr = []) => | |
arr.toString("").split(",").map(Number); |
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
let arr = [ | |
[1, 2, 3], | |
[4, 5, 6], | |
[9, 8, 9], | |
]; | |
let firstSum = 0,secondSum = 0; | |
for (let i = 0; i < arr.length; i++) { | |
firstSum +=arr[i][i]; | |
} |
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 binarySearch(score, ranked,start = 0,end = ranked.length - 1) { | |
while (true){ | |
let mid = Math.floor((start + end) / 2); | |
if (ranked[mid] === score) | |
return mid + 1; | |
else if (ranked[mid] > score && ranked[mid + 1] < score) | |
return mid + 2; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
struct triangle | |
{ | |
int a,b,c; | |
}; | |
typedef struct triangle triangle; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAX_HEIGHT 41 | |
struct box | |
{ | |
int length, width, height; | |
}; |