ques : https://practice.geeksforgeeks.org/problems/kth-smallest-element/0
soln : https://ide.codingblocks.com/s/289073
my code is giving time limit error, please check
ques : https://practice.geeksforgeeks.org/problems/kth-smallest-element/0
soln : https://ide.codingblocks.com/s/289073
my code is giving time limit error, please check
hi @chaman9,since according to constraints, the input can be very large use fast I/O methods like scanf or printf for I/O or add these two lines below int main funtion
ios_base::sync_with_stdio(false);
cin.tie(NULL);
corrected code :- https://ide.codingblocks.com/s/289080
To know more about fast I/O refer :- https://www.geeksforgeeks.org/fast-io-for-competitive-programming/
Thanks a lot abhijeet… it worked