will using structure in code reduces time complexity ?
What does the structure define? An array? A fenwick tree? Structure alone will do nothing for time complexity.
2 Likes
let us suppose in a problem i have n strings and n numbers then creating string array and integer array will help in reducing time complexity or will a array structure of string and number will help in reducing time complexity ?
Time Complexity is the wrong word for it. Let’s say, it may reduce the runtime? Time complexity is of an algorithm, n and 2n operation both have linear time complexity but different runtimes.
no it won’t. But it makes the program easier to understand maybe.