Searching in an Array where elements differ by K | Hindi | GFG | Problem Solving | Shashwat

Sdílet
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

Komentáře • 7

  • @shashwat_tiwari_st
    @shashwat_tiwari_st  Před rokem

    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

  • @siddharthb2226
    @siddharthb2226 Před 2 lety +1

    next level video

  • @rushikeshdeshmukhmarathibo7465

    Majja aagaya

  • @rdxgaurav3483
    @rdxgaurav3483 Před 2 lety

    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 😁😁

  • @eddiepulaski237
    @eddiepulaski237 Před rokem

    Hey, can this question be done by binary search?

  • @ronniurban
    @ronniurban Před 2 lety

    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)