UTF - 8 Encoding Explained using Bit Manipulation | Bit Manipulation Interview Questions

Sdílet
Vložit
  • čas přidán 31. 08. 2020
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we explain about UTF - 8 encoding using bit manipulation in data structure in Java. In this problem,
    1. You are given an array of integers.
    2. You are required to test whether the array represents a valid sequence of UTF-8 characters or not.
    3. A character in UTF-8 can be from 1 to 4 bytes long and follows some rules -
    (i) For 1-byte long character, first bit will be 0 and rest represents its unicode code.
    (ii) For n-bytes long character, first n-bits will be 1's, the n+1th bit is 0, followed by n-1 bytes with most significant 2 bits being 10.
    Note - Only the least significant 8 bits of each element in array is used for data.
    Note - Check out the video for details.
    For a better experience and more exercises, VISIT: www.pepcoding.com/resources/o...
    #utf8 #bitmanipulation #bits
    Have a look at our result: www.pepcoding.com/placements
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education
    Join us on Telegram: t.me/joinchat/UVTjJE83a-zFnPB

Komentáře • 42

  • @sourin.majumdar
    @sourin.majumdar Před rokem +3

    itni patience k sath samjhaya, Salute hai!! Crystal clear samajh aaya

  • @ritikmishra5210
    @ritikmishra5210 Před 2 lety +11

    Those facing issue in leetcode submission, just add this condition in first if

  • @prajyotgurav
    @prajyotgurav Před rokem +1

    I couldn't understand today's Leetcode

  • @creativegiant148
    @creativegiant148 Před 3 lety +5

    Sir kuch case reh gaye hain solution me jaise ki agr pehla number hii 10 se start hoga toh program handle nahi kr paye ga usse

  • @balaveeraraghavareddy9764

    Thanks a lot very nice explanation

  • @adityarao8803
    @adityarao8803 Před rokem

    Awesome Explanation Sir.

  • @akhilesh59
    @akhilesh59 Před rokem

    Very Nice Explanation. Thanks a lot Sir

  • @pariveshmehta2298
    @pariveshmehta2298 Před 2 lety +2

    sir isme aapne ek case consider nahi kiya jisme koi bhi condition satisfy na ho.

  • @pareshshikhaliya4702
    @pareshshikhaliya4702 Před 2 lety

    best explanation

  • @shwetanksingh5438
    @shwetanksingh5438 Před rokem

    Thank You! <3

  • @pjagannadham2540
    @pjagannadham2540 Před rokem

    good explanation sir

  • @shubhamrawat7895
    @shubhamrawat7895 Před 3 lety +3

    Wao.. Great logic! I was thinking to use if else for every checking.. Using remainingbytes variable is nice 🔥😮

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

    i found the checking logic for remaining bytes in loop beautiful ,sumeet sir great as always

  • @rahulbhatia3075
    @rahulbhatia3075 Před 3 lety +1

    Next level explaination 🙏🙏

  • @umanggupta9199
    @umanggupta9199 Před 3 lety +1

    Sir I think the code doesn't handle one case in which one element starts with 110 and next two or more elements start with 10. For that you need to add an else return false in first if case.

  • @ankitmindewar3710
    @ankitmindewar3710 Před 3 lety +1

    sir, video portal par play nhi ho rhi hai.

  • @satyajeetrajupali3147

    Correct Solution:

  • @amandixit3555
    @amandixit3555 Před 3 lety

    sir aap agar formal shirt mei vedio bano ge to jyada viwes aayenge , give it a try !!!

  • @aashishjha3223
    @aashishjha3223 Před 3 lety +3

    Sir, it's not submitting in leetcode.

  • @code7434
    @code7434 Před 3 lety

    Sir binary search ke partitions of array ke que ki variations krwado please :)