Why this code is not running

why this code is not running even after using randomized quicksort

hi @Adityakumar3112, there are two errors in your code

  1. at line 23 you should be doing int ran=s+rand()%(e-s+1); instead of (s-e) as its a negetive term
  2. you have define your array size to be 100 but n can be as large as 100000

i have corrected your code here :- https://ide.codingblocks.com/s/236261

In case of any doubt feel free to ask :slight_smile:
If you got the answer then mark your doubt as resolved