What is the time complexity for the following C module? Assume that n > 0; int module(int n) { if(n == 1) return 1; else return (n + module(n-1)); }
What is the time complexity for the following C module? Assume that n > 0; int module(int n) { if(n == 1) return 1; else return (n + module(n-1)); } Correct Answer O(n)
মোঃ আরিফুল ইসলাম
Feb 20, 2025