0
Is mybcode satisfies below condition?
I am having doubt about complexities of below code? Is the below code has space complexity =O(n) and time Conplexity =O(1).pls answer me what is time and space complexity of code below. And i don't have clear idea of how to find complexities of algorithm. Pls suggest any video tutorial or any book reference to me. https://code.sololearn.com/cY06ASinYCbY/?ref=app
1 Réponse
0
both are O(n) because if you process array of n * 10 length it takes n * 10 more operations in time and takes n *10 more spaces in memory.