Advertisement
STANAANDREY

complexity example

Jun 16th, 2024
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.15 KB | None | 0 0
  1. int j;
  2.  
  3. for(int i=0; i<=n-1; i = i + j){
  4.    
  5.     for(j=i+1; j<=k; j++){
  6.        
  7.         //Constant Work
  8.         //....
  9.        
  10.     }
  11.  
  12. }
  13.  
  14. //O(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement