---
title: "Discussion on \"Solving Kth Largest Element in an Array\" | Hashnode"
description: "Discussion on \"Solving Kth Largest Element in an Array\". To see the question, click here.\nNaive Approach\nTo find the kth largest element, we can first sort the array and then return the nums.length - k th element.\n// TC: O(nlogn)\n// SC: O(1)\n\nimport java.util.Arrays;\n\nclass KthLargestElement {\n\n    public ..."
url: "https://hashnode.com/posts/solving-kth-largest-element-in-an-array/668e7ef451333a704ec21b3f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Solving Kth Largest Element in an Array](https://vineethchivukula.hashnode.dev/solving-kth-largest-element-in-an-array?utm_source=hashnode&utm_medium=feed)

To see the question, click here. Naive Approach To find the kth largest element, we can first sort the array and then return the nums.length - k th element. // TC: O(nlogn) // SC: O(1) import java.util.Arrays; class KthLargestElement { public ...

Jul 10, 2024 · 5 min read · vineethchivukula.hashnode.dev  
Read the article

-   [#kth-largest-element](https://hashnode.com/tag/kth-largest-element)
-   [#heap](https://hashnode.com/tag/heap)
-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Vineeth Chivukula](https://hashnode.com/@vineethchivukula)

@vineethchivukula · Andhra Pradesh, India

  
[View profile](https://hashnode.com/@vineethchivukula)

Developer && Video editor

There's this guy who's mad about editing and programming. It's his jam, you know?

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
