Java Streams Interview Question - 10 - Get Second Highest/Lowest Number using Streams

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • Java Streams Interview Question - 10 - Get Second Highest/Lowest Number using Streams
    Schedule a meeting in case of any queries/guidance/counselling:
    calendly.com/n...
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Naveen AutomationLabs Paid Courses:
    GIT Hub Course:
    naveenautomati...
    Java & Selenium:
    naveenautomati...
    Java & API +POSTMAN + RestAssured + HttpClient:
    naveenautomati...

КОМЕНТАРІ • 26

  • @factandknowledge759
    @factandknowledge759 Місяць тому

    It is necessary to use limit we can skip using limit for this

  • @maharishi1
    @maharishi1 5 місяців тому

    thanks, man for these videos..... really helpful please continue interview related video...

  • @alisheheryar6306
    @alisheheryar6306 11 днів тому +1

    these were helpful, appreciate the effort man

  • @SamiSabirIdrissi
    @SamiSabirIdrissi 2 роки тому +1

    My man Naveen! flexing the best content

  • @AMANSINGH-yv4vv
    @AMANSINGH-yv4vv Місяць тому

    We don't need the limit method right ? Anyway we are finding the first whatever is the limit -no need of shrinking it anyway !

  • @mohammadmutawe9783
    @mohammadmutawe9783 Рік тому +1

    Thanks for sharing

  • @jagadeeshbaskaran4881
    @jagadeeshbaskaran4881 2 роки тому +3

    Got this question in interview today. could not answer it. Thanks for sharing the answer.

  • @SudeepKumar-it3pp
    @SudeepKumar-it3pp 4 місяці тому +2

    completed all videos

  • @strix-nebulosa
    @strix-nebulosa 2 роки тому +4

    Why not just make a sorted set , call it "int_set", from the list and then return int_set[1], and int_set[n-1] (please forgive poor syntax). Seems easier and cleaner code.

    • @abhilashg1368
      @abhilashg1368 2 роки тому

      The question is to test collections knowledge, the problem can be solved without using collections too.

    • @madhavmishra2066
      @madhavmishra2066 10 місяців тому

      bro set also comes in collection
      @@abhilashg1368

    • @AMANSINGH-yv4vv
      @AMANSINGH-yv4vv Місяць тому

      not everyone can easily catch that set removes duplicates , may be thats y he used distinct instead of Set

  • @alim241081
    @alim241081 2 місяці тому

    lakin ye sab method kaise pata chalegi ki kidhar hai aur kiske under me hai

  • @udaybhaskar4940
    @udaybhaskar4940 Рік тому +1

    I have doubt why use find first directly skip function will work

    • @abhishekmishra4296
      @abhishekmishra4296 Рік тому

      skip() will give you a stream, so to extract value from the stream you have to do findFirst

  • @kirane5911
    @kirane5911 Рік тому +3

    Very useful video

  • @smitj6671
    @smitj6671 Місяць тому +1

    much love to you sir❤

  • @paridadeepika
    @paridadeepika 4 місяці тому

    You explained very clearly,thank you

  • @annajiraoannepu2718
    @annajiraoannepu2718 6 місяців тому

    you are explaining the things very clear. thank you

  • @RaahithyaYadav
    @RaahithyaYadav 2 роки тому +1

    Thank you Naveen

  • @kirane5911
    @kirane5911 11 місяців тому +1

    Thanks

  • @thendral7869
    @thendral7869 2 роки тому +1

    Very great Naveen,thank you

  • @bavajanshaik1355
    @bavajanshaik1355 2 роки тому +1

    Super sir

  • @SudeepKumar-it3pp
    @SudeepKumar-it3pp 4 місяці тому

    completed all videos

  • @vengateshm2122
    @vengateshm2122 2 роки тому

    Very helpful. Thank You Naveen.