Searching in an Array where elements differ by K | Hindi | GFG | Problem Solving | Shashwat
Vložit
- čas přidán 18. 10. 2021
- Java Plus DSA Complete Placement Course:
• Java and DSA Course Pl...
Coding Interview Problem Playlist:
• Problem Solving | Prod...
Problem Statement:
A step array is an array of integer where each element has a difference of at most k with its neighbor. Given a key x, we need to find the index value of k if multiple elements exist, return the first occurrence of the key.
Problem Link:
practice.geeksforgeeks.org/pr...
Solution Snippet:
github.com/Tiwarishashwat/Int...
Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe
Instagram Handle: (@shashwat_tiwari_st)
shashwattiwari.page.link/shas...
#ShashwatTiwari #coding #problemsolving #leetcode #hackerrank #hackerearth #codechef #codesignal #algorithms #javaprogramming #sde #placement #programming
#coding #programming #programmer #python #developer #code #javascript #coder #computerscience #technology #java #codinglife #html #webdeveloper #tech #webdevelopment #css #software #webdesign #softwaredeveloper #linux #programmers #softwareengineer #php #programmingmemes #machinelearning #programminglife #pythonprogramming #codingisfun
This is a very old video, for better sound and camera quality DSA videos, learn from the below playlist!
Java Plus DSA ( Java + DSA + Problem Solving )
czcams.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html
next level video
Majja aagaya
Nice explanation but it would be better if you would have showed us dry run for different test cases , but its fine you video length might have increased. It took me some time to analyze test cases where I failed but finally I got the concept watching the video again and again , Finally thanks !!
Keep it up 😁😁
Hey, can this question be done by binary search?
applying simple search using for loop and returning -1 runs for all test cases where am i going wrong please look since im not considering k anywhere
this code ! gets submitted with O(n)
Interviewer will ask you to use K in your solution, that's why.