Sign in

Photo by Nicolas Picard on Unsplash

Photo by Phyllis Poon on Unsplash
Input : 
a = "a", "jk", "abb", "mn", "abc"…

Photo by Adrien Robert on Unsplash


Photo by Edvard Alexander Rølvaag on Unsplash


Photo by William Daigneault on Unsplash

Photo by Sigmund on Unsplash

Photo by kofookoo.de on Unsplash
Input: target =…

Photo by Kelly Sikkema on Unsplash
Input:  arr[] = {1, 3, 6, 10, 11, 15};
Output: 2

Input: arr[] = {1, 1, 1, 1};
Output: 5

Input: arr[] = {1, 1, 3, 4};
Output: 10

Input: arr[] = {1, 2, 5, 10, 20, 40};
Output: 4

Input: arr[] = {1, 2, 3, 4, 5, 6};
Output…


Photo by Mika Baumeister on Unsplash
  • i + 1 where: i + 1 < arr.length.
  • i - 1 where: i - 1 >= 0.
  • j where: arr[i]…

Jaydeep

Full Stack Programmer, love to solve problem’s during free time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store