Huffman Coding | GeeksforGeeks

  Рет қаралды 423,544

GeeksforGeeks

GeeksforGeeks

Күн бұрын

Пікірлер: 95
@purefall91
@purefall91 6 жыл бұрын
Just note that prefix codes are a subset of uniquely decodable codes. A code can be uniquely decodable but not prefix code.
@jorecode8486
@jorecode8486 3 жыл бұрын
your video was more helpfull than 10 hours of my teacher trying to explain this
@JesseBourretGheysen
@JesseBourretGheysen 3 жыл бұрын
I go to your website all the time, and never knew that you had a youtube channel. Awesome work, and thank you.
@malharjajoo7393
@malharjajoo7393 5 жыл бұрын
At 5:30 - it would be useful to mention that each node stores the characters found in the leaves below it. This helps to "find" a character when traversing from the root by simply checking which of it's sub-children contains the desired character.
@hrs7305
@hrs7305 Жыл бұрын
That’s is entirely incorrect
@hrs7305
@hrs7305 Жыл бұрын
You don’t find a character in this ds, it’s utility is to compress and decompress data
@BRabbid
@BRabbid Жыл бұрын
Yeah, it doesn't matter if each node stores the characters below it because when we get the compressed data, we're already given the compressed binary representation for each node. Following this representation, 0 means traverse left and 1 means traverse right, we can find the symbol that we want.
@julievrhackzor
@julievrhackzor 3 жыл бұрын
Its people like you that keep this world spinnin
@SpacePunk1000
@SpacePunk1000 7 ай бұрын
wait shouldn't the larger freq. be assigned 0?
@mysmallcap
@mysmallcap 6 жыл бұрын
Please explain how an internal node can be inserted in a heap. When it already has left and right children, how can we heapify the tree without actually disrupting the left and right children of this internal node?
@kicksomeup6998
@kicksomeup6998 Жыл бұрын
By insertion a node into a minheap, do you actually mean inserting it into the Huffman tree? I think tree and heap and seperate data structuees here.
@petarulev6977
@petarulev6977 2 жыл бұрын
You could have briefly explained about the heap structure
@kaustubhvedak2802
@kaustubhvedak2802 3 жыл бұрын
i will like to get detailed explanation video on this the functions are to complicated to understand and as u said at 6:50 about min heap there are no proper videos for min heap the concept is clear but to create a min heap is different and applying this in this concept is totally different plzz explain the code in detail
@puppetpaandu4470
@puppetpaandu4470 3 жыл бұрын
Thanks for clear explanation which is lacking in many other vidoes
@M07Status
@M07Status Жыл бұрын
1:47 it's Said Min Heap But we are constructing Max heap ??
@musicalspace6885
@musicalspace6885 5 жыл бұрын
I want to ask, are compression and decompression same things as encoding and decoding the message?
@austinoquinn815
@austinoquinn815 5 жыл бұрын
kind of, compression and decompression are forms of encoding and decoding that are meant to take up less space.
@martinhawes5647
@martinhawes5647 3 жыл бұрын
@@austinoquinn815 I never thought about this distinction, but you’re right.
@gulkayma
@gulkayma 6 жыл бұрын
The size of the file I compressed was larger than the original. What can I do for it? FILE *file = fopen("C:/Nutuk.txt", "rb"); FILE *file2 = fopen("C:/CompressFile.txt", "wb"); char ch; while(!feof(file)){ ch = getc(file); //forexample my code blog if(ch=='a' || ch=='A'){ fprintf(file2,"011"); } .... fclose(file)
@ramireddylohithreddy6852
@ramireddylohithreddy6852 2 жыл бұрын
LOL...
@stith_pragya
@stith_pragya Жыл бұрын
Thank You So Much for this wonderful video.....🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@kiranthota5137
@kiranthota5137 2 жыл бұрын
Thanks for the resource, i would like to request if the explanation is more detailed it would be so helpful, now it is cofusing.
@raip
@raip 7 жыл бұрын
How to take decision whether to go right or left, e.g. for we went LEFT from ROOT why? what is the property we should look to take the decision whether to go LEFT or RIGHT?
@GeeksforGeeksVideos
@GeeksforGeeksVideos 7 жыл бұрын
I believe, you are concerned about getting the codes for characters. In that case, since we are printing the whole tree, we are not really concerned whether to go left or right. We traverse all the root to leaf paths and print the path at every leaf node. Hope this solves your confusion. :)
@ΑντρέαςΣωτηρίου-π8γ
@ΑντρέαςΣωτηρίου-π8γ 7 жыл бұрын
help,what is the point of minHeapify function in the code?
@austinoquinn815
@austinoquinn815 5 жыл бұрын
@@ΑντρέαςΣωτηρίου-π8γ it sorts the letters by the minimum frequency
@skidipap8750
@skidipap8750 Жыл бұрын
why a has lower binary number then b? a has lower frequency than b, it is not logical.
@baconmunchh
@baconmunchh 2 ай бұрын
So the Indian guy on KZbin explaining a concept better than department heads with multiple PHDs was true all along
@rageydo5222
@rageydo5222 5 жыл бұрын
That is not a min heap
@chawza8402
@chawza8402 5 жыл бұрын
I think they do, he just doesn't show it. he uses the min-heap to select the minimum node from the table
@rakeshraj4341
@rakeshraj4341 5 жыл бұрын
#geeksforgeeks share this video
@ronstewtsaw
@ronstewtsaw 7 жыл бұрын
This was very helpful to me. I did have to start, stop and rewind a couple of times.
@jasmeenx2607
@jasmeenx2607 6 жыл бұрын
where did the frequencies come from
@GeeksforGeeksVideos
@GeeksforGeeksVideos 6 жыл бұрын
They are derived from the input data.
@azmals.m5756
@azmals.m5756 4 жыл бұрын
Good explanation...its help me
@tamisuefarber5410
@tamisuefarber5410 4 жыл бұрын
Thank you! You really helped me to understand the logic.
@salmachakroun4590
@salmachakroun4590 2 жыл бұрын
This is in C language ?
@lakshitpaliwal
@lakshitpaliwal 6 жыл бұрын
what we do if frequency are same ?
@547vaibhav
@547vaibhav 6 жыл бұрын
why the quality of the video is 360p at max. you must record it in 720p atleast.
@RahmaElsaeed-cf6ru
@RahmaElsaeed-cf6ru 5 жыл бұрын
where the decoder please?
@austinoquinn815
@austinoquinn815 5 жыл бұрын
To decode you just walk through the string (left to right) of digits and the first letter you can make with the characters is the one you print. to decode you need to know either the encodings or the frequencies of each character. It may look like this for i in String: code=code+i if(code=an encoding from the list of encodings): print(the encoded letter) code=""
@Anca1202I
@Anca1202I 5 жыл бұрын
if I have 3 characters with the same frequency ,how I choose them?
@MahbuburRahman-uc7np
@MahbuburRahman-uc7np 5 жыл бұрын
you can choose any one of them .
@JosephWilliams-v9x
@JosephWilliams-v9x Ай бұрын
Lee Linda Lewis Mark Martin Robert
@MariaPaula-fc3mh
@MariaPaula-fc3mh 5 жыл бұрын
what is this all about ,why do we study or need huffman coding,what is a frequency and why we need it? I would like an overwiew or explanation on this topic..
@nixuser1980
@nixuser1980 4 жыл бұрын
It's the basic idea behind lossless data compression.
@reneew
@reneew 5 жыл бұрын
What's the use of *
@lilac_moon1896
@lilac_moon1896 2 жыл бұрын
Thank you for this video😇
@pihaaaa
@pihaaaa Жыл бұрын
ily geeksforgeeks
@simranrastogi4926
@simranrastogi4926 6 жыл бұрын
Nice explanation
@frustratedmf54
@frustratedmf54 5 жыл бұрын
Why do you keep saying min heap?? After adding new internal node, it's not a min heap anymore!
@godtux
@godtux 5 жыл бұрын
It's still is, because a heap put new stuff 'in the good place', ie ordered.
@austinoquinn815
@austinoquinn815 5 жыл бұрын
yes it is
@GaryLee-j2v
@GaryLee-j2v 2 ай бұрын
Thompson George Jones Betty Garcia Timothy
@randomguy574
@randomguy574 3 жыл бұрын
Thanks sar
@ramakrishnavelpuri1390
@ramakrishnavelpuri1390 2 жыл бұрын
Thanks!
@vaggelismanousakis6147
@vaggelismanousakis6147 4 жыл бұрын
Thank you! Why did you use 360p, it's 2020. a 720p is a minimum i think..
@Walen233
@Walen233 4 жыл бұрын
who the f cares
@halcion1516
@halcion1516 3 жыл бұрын
thank you!
@AbdussamadJnr
@AbdussamadJnr 4 жыл бұрын
Thanks Well explained 👍 👍 👍
@ishanksharma2785
@ishanksharma2785 5 жыл бұрын
you sound like Ben Tennison from "Ben 10 Alien Force"
@Frient
@Frient 5 жыл бұрын
Where’s the video where we learn about poo in the loo?
@yatharth_er
@yatharth_er 7 жыл бұрын
maje aagaye
@rohandevaki4349
@rohandevaki4349 2 жыл бұрын
can you provide java code?
@krypto7264
@krypto7264 6 жыл бұрын
0:01 chai peelo frands!!
@Rahulmishra-iv9dt
@Rahulmishra-iv9dt 6 жыл бұрын
kryptoknight pilao
@alenthomaskattakayam8090
@alenthomaskattakayam8090 4 жыл бұрын
can u send me the slides......
@akashdaswani2308
@akashdaswani2308 6 жыл бұрын
Thanks
@BudSmoke37
@BudSmoke37 6 жыл бұрын
thanku brother.
@amritdaimarydaimary4488
@amritdaimarydaimary4488 7 жыл бұрын
good work
@GeeksforGeeksVideos
@GeeksforGeeksVideos 7 жыл бұрын
Thanks
@JacoxNovak
@JacoxNovak 6 жыл бұрын
thanks
@GeeksforGeeksVideos
@GeeksforGeeksVideos 6 жыл бұрын
You're welcome Jacox :)
@konradiwan2661
@konradiwan2661 6 жыл бұрын
Thanks for the video, it helped me
@GeeksforGeeksVideos
@GeeksforGeeksVideos 6 жыл бұрын
Thanks Konrad Iwan :)
@GaryLee-j2v
@GaryLee-j2v 2 ай бұрын
Hall Sarah White Lisa White Nancy
@sayad4042
@sayad4042 4 жыл бұрын
WHERE MY CS 335 HOMIES AT
@vanesamihailova2548
@vanesamihailova2548 5 жыл бұрын
vrska nemass
@kalamii_3215
@kalamii_3215 6 жыл бұрын
stooooppp!! this cringey indian accent is pissing me off
@Ashley-gn6ji
@Ashley-gn6ji 5 жыл бұрын
Oh no, God forbid someone from another country uploads a KZbin video.
@kalamii_3215
@kalamii_3215 5 жыл бұрын
@@Ashley-gn6ji nah thats not the problem, it's the accent.. it's too cringey and distracting
@Ashley-gn6ji
@Ashley-gn6ji 5 жыл бұрын
@@kalamii_3215 But that's his accent. If you don't like it you don't have to watch the video or comment on it
@kalamii_3215
@kalamii_3215 5 жыл бұрын
@@Ashley-gn6ji well whats the comment section for?, i was just giving my opinion
@ishanksharma2785
@ishanksharma2785 5 жыл бұрын
you sound like Ben Tennison from "Ben 10 Alien Force"
@garrett6408
@garrett6408 5 жыл бұрын
you sound like Ben Tennison from "Ben 10 Alien Force"
@sadmanpranto9026
@sadmanpranto9026 4 жыл бұрын
how ??
@garrett6408
@garrett6408 4 жыл бұрын
@@sadmanpranto9026 what do you mean?
@sadmanpranto9026
@sadmanpranto9026 4 жыл бұрын
@@garrett6408 I've watched Ben 10 Alien Force... he doesn't sound like Ben at all
@garrett6408
@garrett6408 4 жыл бұрын
@@sadmanpranto9026 you sound like Ben Tennison from Ben Ten Alien Force
@sadmanpranto9026
@sadmanpranto9026 4 жыл бұрын
@@garrett6408 no... I sound like a duck with sort throat, runny nose and severe prawn allergy.
Efficient Huffman Coding for Sorted Input | GeeksforGeeks
10:30
GeeksforGeeks
Рет қаралды 18 М.
Huffman coding algorithm - Inside code
17:31
Inside code
Рет қаралды 9 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 248 МЛН
I thought one thing and the truth is something else 😂
00:34
عائلة ابو رعد Abo Raad family
Рет қаралды 12 МЛН
3.4 Huffman Coding - Greedy Method
17:44
Abdul Bari
Рет қаралды 1,7 МЛН
Huffman Codes: An Information Theory Perspective
29:11
Reducible
Рет қаралды 236 М.
9.1 Huffman Coding  -Greedy Method |Data Structures Tutorials
34:05
Jenny's Lectures CS IT
Рет қаралды 555 М.
Google Coding Interview With A Competitive Programmer
54:17
Clément Mihailescu
Рет қаралды 2,5 МЛН
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 8 М.
How Computers Compress Text: Huffman Coding and Huffman Trees
6:30
Tom Scott
Рет қаралды 1,9 МЛН
Medium Google Coding Interview With Ben Awad
51:27
Clément Mihailescu
Рет қаралды 1,3 МЛН
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 200 М.
Winning Facebook (Meta) Hacker Cup Qual Round 2022?
53:55
Neal Wu
Рет қаралды 2,6 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 248 МЛН