To the Top
File:  root - text - article - 2019 - 11 - find-the-k-th-largest-element-in-a-list.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 163 Views, 24485 Search Bots | 66 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Facebook:

By the way, check out our NEW project AlgoPro (http://algopro.com) for over 60+ video coding sessions with ex-Google/ex-Facebook engineers.

Given a list, find the k-th largest element in the list.
Input: list = [3, 5, 2, 4, 6, 8], k = 3
Output: 5
Here is a starting point:


def findKthLargest(nums, k):
# Fill this in.

print findKthLargest([3, 5, 2, 4, 6, 8], 3)
# 5
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 163 Views, 24485 Search Bots | 66 Words Subscribe to Feed Burner

Related Articles

  1. Algorithm Interview: Permutations of numbers
  2. First and Last Indices of an Element in a Sorted Array
  3. Daily Interview Problem: Decode String
  4. A trick for getting good at coding interviews FASTER
  5. Daily Interview Problem: Min Stack
  6. Daily Interview Problem: Jump to the End
  7. Daily Interview Problem: Largest Product of 3 Elements I
  8. Daily Interview Question: Create a Simple Calculator
  9. Non-decreasing Array with Single Modification
  10. Algorithm Interview: String Compression

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />