Find k largest elements in an array
Given an array arr[] and an integer k, the task is to find k largest elements in the given array. Elements in the output array should be in decreasing order. Examples: Input: [1, 23, 12, 9, 30, 2, 50], K = 3Output: [50, 30, 23] Input: [11, 5, 12, 9, 44, 17, 2], K = 2Output: [44, 17] Table of Content