To the Top
File:  root - text - article - 2020 - 01 - subarray-with-target-sum.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 236 Views, 21134 Search Bots | 63 Words

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

You are given an array of integers, and an integer K. Return the subarray which sums to K. You can assume that a solution will always exist.


def find_continuous_k(list, k):
# Fill this in.

print find_continuous_k([1, 3, 2, 5, 7, 2], 14)
# [2, 5, 7]


Can you do this in linear time?
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 236 Views, 21134 Search Bots | 63 Words Subscribe to Feed Burner

Related Articles

  1. CVE-2015-8874 - cPanel EasyApache Vulnerabilities
  2. Daily Interview Problem: Jump to the End
  3. [Daily Problem] Angles of a Clock
  4. Spreadsheet Column Title
  5. Two-Sum
  6. Invert a Binary Tree
  7. [Daily Problem] Remove k-th Last Element From Linked List
  8. Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
  9. Progess made
  10. Daily Interview Problem: Trapping Rainwater

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