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 | 536 Views, 25546 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 | 536 Views, 25546 Search Bots | 63 Words Subscribe to Feed Burner

Related Articles

  1. Daily Interview Problem: Largest BST in a Binary Tree
  2. Patterns for breaking down questions you haven
  3. Design Tic-Tac-Toe
  4. Daily Interview Question: Longest Sequence with Two Unique Numbers
  5. [Daily Problem] Add two numbers as a linked list
  6. Daily Interview Problem: Get all Values at a Certain Height in a Binary Tree
  7. Daily Interview Problem: Spiral Traversal of Grid
  8. New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
  9. Daily Interview Problem: Merge List Of Number Into Ranges
  10. A trick for getting good at coding interviews FASTER

Comments (0)

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