Kth Smallest Element

    0

    0

    Aakanksha Priya

    Find the kth smallest element in an array

    arr = [10, 11, 45, 89, 33, 30]
    arr_size = 6
    k = int(input("Element to get: "))
    arr.sort()
    print("Required element is: ",arr[k-1])
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.