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 | 162 Views, 24103 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 | 162 Views, 24103 Search Bots | 66 Words Subscribe to Feed Burner

Related Articles

  1. Patterns for breaking down questions you haven
  2. Top K Frequent words
  3. Algorithm Interview: Determine If Linked List is Palindrome
  4. Sorting a list with 3 unique numbers
  5. Invert a Binary Tree
  6. Autorun.inf Virus Protection
  7. Daily Interview Problem: Given two arrays, write a function to compute their intersection.
  8. Algorithm Interview Question: H-Index
  9. Spreadsheet Column Title
  10. Windows Scripting

Comments (0)

    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="index, follow">