LeetCode 1371. Find the Longest Substring Containing Vowels in Even Counts

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 7

  • @akhilmn4013
    @akhilmn4013 3 місяці тому

    I think an important thing to sort of internalize is that when you insert a parity into the hashmap, you are guaranteed that this is the earliest index at which this parity is found. So everytime you encounter this parity again, you are comparing it with the earliest index you encountered this parity, which gives you the longest length as i keeps increasing. Thanks for the great video, took a little while to digest but seems to be very helpful in solving problems with a similar recurring pattern!

  • @rakshitgupta6147
    @rakshitgupta6147 3 місяці тому

    best explanation sir. thanks you so much

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

    Nice explanation, tricky to get the insight to check for parity. I used a stringbuilder as my bitmask because it was simpler to deal with.

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

    Loved the solution

  • @rohanbose4882
    @rohanbose4882 3 роки тому

    Beautiful explanation

  • @aarsh0608
    @aarsh0608 3 роки тому +1

    Great solution

  • @saunaknandi1814
    @saunaknandi1814 2 роки тому +2

    I didn't understand it 😔