Assuming I have an array that has a size of N (where N > 0), is there a more efficient way of prepending to the array that would not require O(N
N
N > 0
Example of prepending in-place:
var A = [7,8,9] var B = [1,2,3] A.unshift(...B) console.log(A) // [1,2,3,7,8,9]