First Repeating Element Java | Selected

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 8

  • @tubemekala
    @tubemekala 3 месяца назад

    set.add(ele) -> returns false for the repeated ele. if(!set.add(ele)) { syso("first repeated element" +ele)}

  • @bikiprasadpradhan2222
    @bikiprasadpradhan2222 11 месяцев назад

    How can we get call now a days the call I don't get can you suggest something please

  • @mattasaikiran4812
    @mattasaikiran4812 Год назад

    My cousin started his career as a fresher on Amdocs 10LPA. How this 1 year experience guy gets 4LPA. Can cloud tech justify this.

    • @cloudtech5260
      @cloudtech5260  Год назад

      Hi Saikiran,
      It depends a lot on where you did your college from. Also, from where you got your 1 year experience.
      If you see this disparity of the package is everywhere in the IT industry.
      Two individuals with the same experience may have different packages.

  • @rajeshkhuntia5004
    @rajeshkhuntia5004 Год назад

    Bro if you take array {1,5,3,4,3,6,5} then according to your program it will give output-3
    But the correct output is -5
    Plese take this array in your program then tell me please.

    • @cloudtech5260
      @cloudtech5260  Год назад

      Hi Bro,
      Let me check.

    • @cloudtech5260
      @cloudtech5260  Год назад

      You are right bro, two things to change.
      We have to run loop from arr.length-1 to 0 instead of 0 to arr.length-1.
      Also, we need to remove the break statement.
      Thanks for pointing out.

    • @rajeshkhuntia5004
      @rajeshkhuntia5004 Год назад

      @@cloudtech5260 if we do this type check this array {1,5,3,5,8,8} it will give output-8 where as the correct output-5 please check this array.