LendingKart Interview Question

Sort a k nearly sorted array