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

Related Articles

  1. Daily Interview Problem: Group Words that are Anagrams
  2. [Daily Problem] Add two numbers as a linked list
  3. Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
  4. Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
  5. Algorithm Interview: Determine If Linked List is Palindrome
  6. [Daily Problem] Remove Consecutive Nodes that Sum to 0
  7. Daily Interview Problem:Create a balanced binary search tree
  8. CPU Utilization
  9. Spreadsheet Column Title
  10. [Daily Problem] Remove k-th Last Element From Linked List

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: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />