SHARE
TWEET

Kth




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- int Kth(int a[],int n,int x,int k)
- {
- if(k==0)
- return -1;
- for(int i=0;i<n;++i)
- {
- if(x==a[i])
- --k;
- if(k==0)
- return i;
- }
- return -1;
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.