3 votes 3 votes what is time complexity : for( i= 1; i < n/22 ; ++i ) can i take n/22 = n for( i= 0 ; i < n/4 - 1 ; ++i ) can i take n/4 - 1 = n will it affect my answer ? because we interseted in upperbound that is n ?? Algorithms algorithms time-complexity + – sumit goyal 1 asked Aug 5, 2017 • retagged Jun 22, 2022 by makhdoom ghaya sumit goyal 1 248 views answer comment Share Follow See 1 comment See all 1 1 comment reply Gaurav Joshi commented Aug 6, 2017 reply Follow Share Yes you can take this as first loop is running n/22 times and the second one is running n/4-1 times adding both =O(n) 0 votes 0 votes Please log in or register to add a comment.
Best answer 0 votes 0 votes yep , we can take it with condition that (n>>22) and other is (n>>4) so that making them as 'N' wont affect the scenario. Sanyam Lakhanpal answered Aug 6, 2017 • selected Aug 6, 2017 by sumit goyal 1 Sanyam Lakhanpal comment Share Follow See all 0 reply Please log in or register to add a comment.