Find the time complexity of sum of two numbers using function Jayesh Umre 10/31/2021 Algo Time Complexity No comments What is the time complexity of the program for the sum of two numbers using function ?Step count methodint sum() {int a,b,c; // ----0a=10; //----1b=20; //----1c=a+b; //----1return c; //----1}f(n) = 0+1+1+1+1 = 4f(n) = O(1) Share:
Post a Comment
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.