알고리즘
015. n번째로 큰 인덱스 ☆
argmax는 최대값의 위치를, argmin는 최소값의 위치를 리턴하는 함수다. 이와 유사하게, 부분순서배열 A에서 n번째로 큰 원소의 인덱스를 리턴하는 argnth(n, A)를 작성하라.
검증예시
julia> X = [0, -1, 7, 3, 9, 2, 11];
julia> argnth(2, X)
5
Are you sure to leave this team?
Once you delete your team, all team notes will be deleted and cannot be recovered. Please ensure you've exported or transfered these notes.
Enter team name before deleting it:
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up