Company: Gameskraft_17_dec
Difficulty: medium
Coding Problem body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; color: #333; max-width: 800px; margin: 20px auto; padding: 0 20px; } h1, h2 { border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; } code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; background-color: #f6f8fa; padding: 0.2em 0.4em; margin: 0; font-size: 85%; border-radius: 6px; } pre { background-color: #f6f8fa; padding: 16px; overflow: auto; border-radius: 6px; } pre code { padding: 0; margin: 0; font-size: 100%; background-color: transparent; } ul { padding-left: 20px; } K-th Greatest Element for Each Prefix Problem Description There is a new assignment for the teacher's assessment evaluation for the students of HackerSchool. Start with a permutation of n integers from 1 through n stored in an array, arr , and an integer k . The k th greatest element of an a