2 votes 2 votes What is the time complexity of the following code snippet? Assume x is a global variable and “statement” takes O(n) time? Algorithms time-complexity algorithms asymptotic-notation recursion + – Warlock lord asked Sep 11, 2017 Warlock lord 823 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Warlock lord commented Sep 11, 2017 reply Follow Share Oh yes silly me. Thanks Rishabh and manu :) 0 votes 0 votes prem6346 commented Dec 14, 2017 reply Follow Share why cant it be T(n)=T(n/2)+c 0 votes 0 votes Mohit Kumar 6 commented Apr 17, 2020 reply Follow Share because statement(which is written in code ) take O(n) time question say. 0 votes 0 votes Please log in or register to add a comment.