#data-structures
Read more stories on Hashnode
Articles with this tag
https://www.youtube.com/watch?v=qap75u_09QA The first method involves sorting whose time complexity is O(nlogn) The second method involves two for...
using one two pointer let s = "madam"; let reverseArray = (s, left, right) => { if (left >= right) { console.log("it's palindrome"); return...
let arr = [1, 2, 3, 4, 5]; let reverseArray = (arr, left, right) => { if (left >= right) { console.log(arr); return; } //swapping first...