DEV Community

Discussion on: 🎯Merge two sorted arrays without using any extra space🎯

Collapse
 
kaiwalyakoparkar profile image
Kaiwalya Koparkar

Yeah, you are right but I don't think the interviewer will like you using inbuilt library functions.🙄

Collapse
 
trueneu profile image
Pavel Gurkov • Edited

Kaiwalya, that didn't stop you from using the built-in sort, right?

aizuliswafaza, the problem is different here: the moment you convert this array into a list, you break the constraint on using constant additional memory.

Thread Thread
 
kaiwalyakoparkar profile image
Kaiwalya Koparkar

That's true