-
Be aware of indexes being floating number Math.floor(number)
-
Be careful where you should use set and where you should use array
const et = new Set<string>()
-
Remember that visited graphs are not required always for directional graphs without loop for DFS
-
Initialize an array with 0 filled in
const vis = new Array(30).fill(0);
- javascript array sort
numbers = arr.sort((a , b) => a-b)