Technoname
  • Python
  • C Programming
  • Java
  • Data Structures & Algorithms
  • Cloud Computing
  • Spring
  • TCS Digital Questions

Subarray with Given Sum – Two Pointers Solution

January 21, 2023 Data Structures & Algorithms
Subarray with given sum using sliding window

Given an unsorted array A of size N that contains only non-negative integers, find a continuous sub-array which adds to a given number S and return the left and right index(1-based indexing) of that subarray.

Recent Posts

  • DataBufferLimitException: Exceeded limit on max bytes – Solved
  • Understanding the Internal Working of HashMap
  • Find Duplicates in Arrays: A Comprehensive Guide
  • Sort an array of 0s, 1s and 2s – Simple Counting Sort Solution
  • Missing number in array : Simple Mathematical Solution
  • About Us
  • Contact Us
  • Disclaimer
  • Home
  • Privacy Policy
Copyright 2025 By Technoname (All Right Reserved)