From 4df293c6ba53a5752408c751f69e142a5d3e9b4a Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 15 Oct 2022 22:17:22 +0530 Subject: [PATCH] kthEelementIntheArray --- heapHash/KthLargestElementinanArray.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 heapHash/KthLargestElementinanArray.cpp diff --git a/heapHash/KthLargestElementinanArray.cpp b/heapHash/KthLargestElementinanArray.cpp new file mode 100644 index 0000000..728f7f9 --- /dev/null +++ b/heapHash/KthLargestElementinanArray.cpp @@ -0,0 +1,17 @@ +class Solution { +public: + int findKthLargest(vector& nums, int k) { + priority_queueans; + for(int i=0;i