summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a464.py
blob: 19a3c5465a8bfbe66ae11b9d5c67c3e1005e4620 (plain)
1
2
3
4
5
6
def kth_element(arr, n, k):
  for i in range(n):
    for j in range(0, n-i-1):
      if arr[j] > arr[j+1]:
        arr[j], arr[j+1] == arr[j+1], arr[j]
  return arr[k-1]