---
title: "Discussion on \"Find a subarray with a given sum\" | Hashnode"
description: "Discussion on \"Find a subarray with a given sum\". Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.\nInput:\nThe first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case..."
url: "https://hashnode.com/posts/find-a-subarray-with-a-given-sum/5dec7810b6829d7f1423a023"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Find a subarray with a given sum](https://asquero.hashnode.dev/find-a-subarray-with-a-given-sum?utm_source=hashnode&utm_medium=feed)

Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case...

Dec 8, 2019 · asquero.hashnode.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#arrays](https://hashnode.com/tag/arrays)

## Written by

[Srajan Gupta](https://hashnode.com/@srajaninnov)

@srajaninnov

  
[View profile](https://hashnode.com/@srajaninnov)

Founder @Asquero

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
