To the Top
File:  root - text - article - 2019 - 11 - largest-product-of-3-elements.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 169 Views, 14587 Search Bots | 95 Words

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

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

You are given an array of integers. Return the largest product that can be made by multiplying any 3 integers in the array.

Example:

[-4, -4, 2, 8] should return 128 as the largest product can be made by multiplying -4 * -4 * 8 = 128.

Here's a starting point:


def maximum_product_of_three(lst):
# Fill this in.

print maximum_product_of_three([-4, -4, 2, 8])
# 128
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 169 Views, 14587 Search Bots | 95 Words Subscribe to Feed Burner

Related Articles

  1. Algorithm Interview Question: H-Index
  2. Fibonacci coding
  3. Daily Interview Puzzle: Minimum Size Subarray Sum
  4. Daily Interview Problem: Largest Product of 3 Elements I
  5. Daily Interview Problem: First Missing Positive Integer
  6. Longest Substring Without Repeating Characters
  7. Daily Interview Problem: Min Stack
  8. Daily Interview Problem: Merge Overlapping Intervals
  9. Algorithm Interview: Shifted String
  10. Daily Interview Problem: Count Number of Unival Subtrees

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" />