CS50x 2024 - Lecture 5 - Data Structures

  Рет қаралды 439,191

CS50

CS50

Күн бұрын

Пікірлер: 297
@oskartrinh6001
@oskartrinh6001 8 ай бұрын
Just finished watching lecture 5. Now it's time to watch it again like 3 more times. :D
@hezziacGames
@hezziacGames 7 ай бұрын
Not too watch it for the 2nd time in a second 😂
@friedrichmyers
@friedrichmyers 6 ай бұрын
No. Just watch it once and practice
@ZerubbabelT.
@ZerubbabelT. 6 ай бұрын
I thought it was only me who do this 😀
@ex4787
@ex4787 5 ай бұрын
@@friedrichmyers *shrug* everyone has different learning styles, I don't replay the whole lecture, but I do like to replay a portion while I'm watching to make sure I can logically follow a concept before moving on to the next
@friedrichmyers
@friedrichmyers 5 ай бұрын
@@ex4787 Just fuck off. I don't want to argue.
@evachen8623
@evachen8623 11 ай бұрын
I've watched CS50 2023 to get started with some concepts of CS and now cmoe back to 2024 from time to time to see David explainging some specifiec concepts when I bump into them when solving problems. Really honored to have David, CS50 series and the team. Many thanks.
@wsollers1
@wsollers1 10 ай бұрын
As a seasoned developer, I use these videos to augment my son's curriculum. This is invaluable knowledge laid out in a clear and compelling way.
@Rodrigo_Pimenta
@Rodrigo_Pimenta 8 ай бұрын
Can you elaborate? Why is it valuable to say on your curriculum that you whached the CS50 online course?
@ousseynoukone
@ousseynoukone 7 ай бұрын
​@@Rodrigo_Pimenta You'll receive a certificate at the end... A certificate that carries significant weight. CS50 is one of the top online courses for an introduction to CS.
@anshuraj4277
@anshuraj4277 7 ай бұрын
Is there any Python DSA course U can recommend
@nohaidea
@nohaidea Ай бұрын
@@anshuraj4277 there's a CS50P python class if you're interested.
@abdullaharshed
@abdullaharshed 4 ай бұрын
I already know these concepts still learned alot from the lecture, for those who are confused and do not understand the concepts take time to grab these concepts, watching the lecture in one sitting can be overwhelming, believe me this is the best as it gets in terms of explaination.
@freelance-writer
@freelance-writer 4 ай бұрын
Yeah, when he asks "So, any questions?", I'm surprised that a hundred hands don't go up. 😆
@meer4h
@meer4h 4 ай бұрын
@@freelance-writer i also feel like it's hard to think about the questions at that pace. for me at least, it takes me running through a specific section a few times before understanding it enough to even form a good question
@freelance-writer
@freelance-writer 4 ай бұрын
@@meer4h I take notes and follow in VS Code while watching, so a 2-hour lecture lasts about 4-5 hours. :)
@thienvinaseco1450
@thienvinaseco1450 Ай бұрын
@@freelance-writer I think people still don't understand enough to ask questions.
@manuelCO89
@manuelCO89 6 ай бұрын
This lesson and that one before are in my top 10 most difficult lessons of this CS50😅
@abdullahfarooq4770
@abdullahfarooq4770 4 ай бұрын
i hope youre not just talking about cs50x because it has like 11 lectures in total so almost every lecture is in your top 10 most difficult lesson haha
@Ahmad-yi6d
@Ahmad-yi6d 3 ай бұрын
​​@@abdullahfarooq4770 Great logic
@Hellmiauz
@Hellmiauz Ай бұрын
@@abdullahfarooq4770 Algorithms, Memory and Data structures are the hardest in CS50X everything else is easier.
@abdullahfarooq4770
@abdullahfarooq4770 Ай бұрын
@@Hellmiauz yeah I completed cs50 This week was the hardest 😭
@pavan7335
@pavan7335 10 ай бұрын
Intro music is a banger!!! Whoever composed it, hatsoff!
@parthdeshwal4419
@parthdeshwal4419 8 ай бұрын
indeed
@rotondwaphosiwa1197
@rotondwaphosiwa1197 6 ай бұрын
cn i sample this shii?!
@Bacinator334
@Bacinator334 3 ай бұрын
String s = "And when everybody is super...no one will be";
@abbashussayn
@abbashussayn 3 ай бұрын
@@Bacinator334 char *s 😭
@Bacinator334
@Bacinator334 3 ай бұрын
@@abbashussayn bro. Go to the library.
@aftertwentea
@aftertwentea Жыл бұрын
This is it, the stumbling stone of CS50🎉🎉🎉
@villagerdude2989
@villagerdude2989 10 ай бұрын
Fr 💀
@bassycounter
@bassycounter 9 ай бұрын
What exactly do you mean by “stumbling”
@misterguy
@misterguy 9 ай бұрын
@@villagerdude2989all I see is everyone loves these lectures
@lintz_lin
@lintz_lin 7 ай бұрын
@@bassycounter Late answer here but I think it's because this is one of the hardest part of the CS50 course, if you get past this block then you'll be very likely to finish the whole course. Some people unfortunately give up at week 4 or week 5.
@bassycounter
@bassycounter 7 ай бұрын
@@lintz_lin oh okay, makes sense. I find it very interesting and refuse to give up until I finish, just turned in week 9 and about start final project once i get everything properly setup locally. Wishing the best of luck and good vibes to everybody else!
@themintroid
@themintroid 3 ай бұрын
brain *my_brain = malloc(sizeof(lecture5)); >segmentation fault
@ProgrammerPenguin
@ProgrammerPenguin 3 ай бұрын
lovely geek humor.
@themintroid
@themintroid 3 ай бұрын
@@ProgrammerPenguin i remembered my brain got fried watching this lecture
@ProgrammerPenguin
@ProgrammerPenguin 3 ай бұрын
@@themintroid i finished the week, im on week 7 but i just wanted to rewatch it.
@themintroid
@themintroid 3 ай бұрын
@@ProgrammerPenguin good luck! week 7 pset is fun
@ProgrammerPenguin
@ProgrammerPenguin 3 ай бұрын
@@themintroid how far have you gotten?
@GenZ_01_
@GenZ_01_ 5 ай бұрын
This is the first time I took an English online course and it’s simply great. I’m short of words. Thank you cs50 staff🙏🏽
@blessdarah1256
@blessdarah1256 10 ай бұрын
This was such a wondeful course. Well put and in very simple terms. If you already have a descent understanding of DSA and some C, it's going to be flawlessly easy to pull through the course.
@FigueMonk
@FigueMonk 6 ай бұрын
I'm at a point where I don't even understand what it is I don't understand.
@lamy1057
@lamy1057 6 ай бұрын
just stop and watch some other video about it then come back
@TheHeroIsRisingUp
@TheHeroIsRisingUp 6 ай бұрын
​@@lamy1057that's what I do 😁
@4olufade
@4olufade 6 ай бұрын
take breaks, at most after one hour but you have to walk away from the computer, headphones, etc literally unplug. On my longest day, I took a two hour break and enjoyed the weather outside before resuming and it and when I resumed it was very simple
@adwaitjog4571
@adwaitjog4571 6 ай бұрын
@@4olufade bro pls tellme i am gonna go to college and i dont know how to code and i am feeling left behind my peers some of them! pls tell me if i watch this in 2x and complete all the lectures in 2 days and the complete all the home work in 10-15 days will it be a good strategy to complete this course fast? as i wanna also take cs50 ai w etc. pls tell
@riinegxn1965
@riinegxn1965 6 ай бұрын
@@adwaitjog4571you’d be better off taking your time so you can absorb the information and get a better foundation. Stop comparing yourselves to others everyone learns at a different pace. But if you still want to try to rush through it do so knowing that you’ll likely miss out on important fundamentals. I’m in the same boat as you basically but i’m just taking my time. Good luck though bro
@sultanghani7356
@sultanghani7356 7 ай бұрын
This man is doing more work than the hardwares.
@abdullah.astro1
@abdullah.astro1 10 ай бұрын
شكرا ديفيد واخيرا خلصت الاسبوع الطويل هذا وبالتوفيق للجميع
@dianaarcticfox5832
@dianaarcticfox5832 6 ай бұрын
Today I feel like Penny trying to study physics with Sheldon Cooper
@rishavjain5087
@rishavjain5087 6 ай бұрын
i started watching, this on monday...and it is wednesday, when i finally got something😂😂
@dianaarcticfox5832
@dianaarcticfox5832 6 ай бұрын
@@rishavjain5087 same friend, same
@Shawky.
@Shawky. Жыл бұрын
Happy New Year and all the best for 2024 ! Happy Coding 😃
@alainrouleau
@alainrouleau 7 ай бұрын
This is ALL pretty crazy in terms of low-level languages like C. And makes you wonder how anything actually got accomplished in the good old days. They no doubt wasted a lot of time on just simple stuff. The equivalent would be of someone wanting to go to the grocery store. But wait... Oh ya, that's right, first I have to build the car, LOL Thank god for high-level languages.
@besegawG
@besegawG 5 ай бұрын
LOL😅
@twincherries6698
@twincherries6698 5 ай бұрын
Isn't C a high level language
@alainrouleau
@alainrouleau 5 ай бұрын
​@@twincherries6698To be honest, it's a bit complicated, if you ask me. When C first came out it was considered high-level compared to other languages. Now the reverse can be argued. And I've even heard it being called a middle-level language, if you can believe it.
@robertedwards4401
@robertedwards4401 4 ай бұрын
To an extent. If you want to compare C with Python and JavaScript, C is a Ferrari and the others are Fords. You may be able to build things quickly with Python and JS, but the manual things one needs to do in C, along with C being one iteration away from machine code, makes it the fastest and most precise language in existence. it doesn’t arbitrarily assign memory like Python or leak like JavaScript and it doesn’t carry and pass around huge pieces of data to other functions/etc.
@algirdasltu1389
@algirdasltu1389 2 ай бұрын
I think you got confused on what level means here. The lower the level of the language, the more control it gives you over hardware (the lowest you go before straight up binary is assembly). Higher level abstracts it all away (kinda like python for example). High level doesnt mean complicated here. Ironically its quite the opposite lol.
@fest8177
@fest8177 Жыл бұрын
We’re back again with this hellish week 😂
@johnmayfield7662
@johnmayfield7662 8 ай бұрын
I loved the balloons explanation Mr. David
@Aman-fz1ew
@Aman-fz1ew 10 ай бұрын
Top quality demonstration .
@publicalways
@publicalways 2 күн бұрын
A big thank you to Prof David Malan for his ability to explain concepts with such clarity. If you also took the supplementary class for the same week 5: Data Structures, you'll really appreciate the huge difference in the teaching ability between him and his other colleagues.
@AndyJagroom-ur7xh
@AndyJagroom-ur7xh 6 ай бұрын
I love cs50 and David
@sefonefinpsefnpefn4191
@sefonefinpsefnpefn4191 10 ай бұрын
finally finish this video! keep going guys!
@anasanas7842
@anasanas7842 Жыл бұрын
"I have no idea what im studying" lol
@sahil-anurag
@sahil-anurag 11 ай бұрын
yeah! i have noticed. lol😂😂
@AnythingGoesCodes
@AnythingGoesCodes 6 ай бұрын
he's paying thousands for that box of cookies
@nepalistories108
@nepalistories108 4 ай бұрын
And he is enrolled in Harvard 🤣🤣
@iSteveJobless
@iSteveJobless 4 ай бұрын
tbh this is one of the most difficult lectures i ever witnessed in my life
@chandrabehera
@chandrabehera 2 ай бұрын
Loved how they showed malloc using balloons and pointing it with threads for showing pointers and pictured the whole linked list. Thank you CS50. These activities are super helpful.
@andoryu14
@andoryu14 8 ай бұрын
I recall people saying week 3 or 4 were the hardest, but this week has really deflated my sails and I'm not even at the pset yet
@nanovoidalt
@nanovoidalt 8 ай бұрын
this one is giving me a headache trying to understand pointer arithmetic. I now see why people call C an archaic language if you're new
@bassycounter
@bassycounter 7 ай бұрын
Yall got this!! Just keep watching lectures and sessions and read the notes if needed.
@andoryu14
@andoryu14 7 ай бұрын
Update: finally submitted the final week 5 problem more than a month later. Hardest week so far for me by a lot, but getting this far has taken me 9 months to do 5 weeks of problems. Don't give up!
@bassycounter
@bassycounter 7 ай бұрын
@@andoryu14 Well done! Speller was certainly a tricky one, I’m not even sure if I’d be able to easily redo it if I were to try it again, but to be fair, a lot of these problem sets are really hard to FULLY digest within only a week, they’re mostly just things you get better at by repeating over time to get more comfortable with. Just a few more weeks to go! The stuff with Python is a breath of fresh air, I just got to the final project about a week ago, still haven’t made much progress with it if I’m being honest since everything is coming from scratch and I’m having trouble with planning out how I want everything to look and work, but I think you’ll like the next few weeks, especially the week with SQL, that was a fun problem set.
@vwhxss-390
@vwhxss-390 7 ай бұрын
​@@andoryu14 Cool bro I just finished week 4, wish me luck
@ex4787
@ex4787 5 ай бұрын
The idea of a database that expands exponentially as you add things to it is hilarious to me. "Congratualtions, fellow scientists, we've put our heads together and come up with an algorithm that always takes constant time to search... Now there's almost no practical scenarios where we could use it, but it's cool, right?"
@MuhammadQasim-92
@MuhammadQasim-92 6 ай бұрын
Thank you sir for explaining it in such a simplified way, respect.
@fbiagent6081
@fbiagent6081 10 ай бұрын
Where was this when i needed it 😭
@Nillipilli
@Nillipilli 6 ай бұрын
Again great way of explaining all these concepts! Very good examples, a pleasure to watch :)
@raxcoins
@raxcoins 11 ай бұрын
Dave has done more than 90% of profs out there. respect.
@xahonmanalocon7405
@xahonmanalocon7405 7 ай бұрын
oh my goodness, i find this part so difficult. i have to rewatch weeks 4 and 5.
@TheGmbo
@TheGmbo 5 ай бұрын
me too
@Bacinator334
@Bacinator334 3 ай бұрын
Understand the problem sets, those will help you more
@omowomaroland1880
@omowomaroland1880 10 ай бұрын
Truly very simplified approach
@sh1w5z
@sh1w5z Ай бұрын
I was just can't stop listening it, Wow
@bblz9171
@bblz9171 6 ай бұрын
I love the linked list demo
@thankyouthankyou1172
@thankyouthankyou1172 11 ай бұрын
I like how well the lecture was prepared: handing out cookies to demo FIFO
@Hellmiauz
@Hellmiauz Ай бұрын
MY BRAIN EXPLODED.
@CptSamel
@CptSamel 7 ай бұрын
This dude is still losing sleep over how the balloon demonstration went but to me it seemed to go just fine 🤷‍♂
@cybrd230
@cybrd230 Жыл бұрын
It suddenly started making a lot more sense.
@asteroideare
@asteroideare 5 ай бұрын
The ballon stuff was lighthearted and cool 🤣🤣🤣. Thanks for that Scully and David
@WizeChoice
@WizeChoice 9 ай бұрын
So Amazing 👉🏾✨✨✨
@TheAuraEngineer
@TheAuraEngineer Ай бұрын
1:45:01 can't you just have an array a-z then each letter a-z points to another array a-z and so on until u reach the amount of letters you need?? edit: nvm they get there oops lol edit2: oml I LOVE TRIES, GIVE ME INFINITE STORAGE CUZ ITS ALL I WANNA USE
@xavier2586
@xavier2586 18 күн бұрын
Thank you Sir❤
@huropjohe2922
@huropjohe2922 7 ай бұрын
1:15:00, I think if node's number is equal, '=' can be add at line62 or line41.
@veronicasmemories
@veronicasmemories Ай бұрын
I'm determined to finish this series before the 2025 videos go live
@akarshsahay4381
@akarshsahay4381 6 ай бұрын
i had a ques at 1:04:25 , when u entered at the terminal 1 2 3, you are also entering spacebars ( ) which cant be converted to integers, so why no error?
@mathesukk
@mathesukk 6 ай бұрын
hi! spaces in your shell(terminal) are used to separate arguments, so the program doesnt even receive those spacebars. so, argv is just [1,2,3] instead of [1, "", 2, "", 3].
@akarshsahay4381
@akarshsahay4381 6 ай бұрын
@@mathesukk okk thanks a lot
@Alexiii15
@Alexiii15 5 ай бұрын
Restarted cs50x , didnt rlly understand it. I was watching until week 8 and decided to retry bc I was struggling to keep up and understand. But now Im getting better at it!
@davidjmalan
@davidjmalan 5 ай бұрын
Welcome back!
@Duck-9900
@Duck-9900 5 ай бұрын
Good job👍
@HoneyHandsH
@HoneyHandsH 5 ай бұрын
I really want a delicious cookie break and stress ball
@smartbrandersai
@smartbrandersai 4 ай бұрын
You gotta watch shorts with these man
@moltyfoam4168
@moltyfoam4168 3 күн бұрын
The balloon activity was super helpful even though it did not go as well, i think it should be kept or a similar activity to it should be kept in the lecture to provide a visual understanding By far the most complicated lecture in the series after algorithm lecture
@MartaBayou
@MartaBayou 7 күн бұрын
Thank you for today
@jordanxperience
@jordanxperience 5 ай бұрын
The only thing more difficult than this course is being born poor in Brazil. So I think I can handle it.
@seiitkhanotegali7734
@seiitkhanotegali7734 5 ай бұрын
can't wait to start week 6 and get to python)
@huropjohe2922
@huropjohe2922 7 ай бұрын
1:21:27 英文字幕裡的[INAUDIBLE],因該是mario,馬力歐,前幾堂課舉的例子。
@Vhc706
@Vhc706 9 ай бұрын
Raise your hand if you choked up on linked lists 🤚
@DTALKS01
@DTALKS01 7 ай бұрын
Amazing explanation of hash table
@clutchyfinger
@clutchyfinger 13 күн бұрын
My progress through this video was O(n), n being the amount of times I rewound.
@sixteen9199
@sixteen9199 2 ай бұрын
gonna make a pointer named gun and point it to my fkn brainnnnnn
@stevenlomon
@stevenlomon 6 ай бұрын
21:26 Whenever using malloc or whenever using pointers?
@antonioskokiantonis7051
@antonioskokiantonis7051 11 ай бұрын
Ok, thank you C, we're moving to your modern child, Python!
@ProgrammerPenguin
@ProgrammerPenguin 8 ай бұрын
lmao!
@jerrypro9454
@jerrypro9454 8 ай бұрын
57:50 Is it just me or atoi function was never introduced before in the lecture?
@paiksprod8358
@paiksprod8358 8 ай бұрын
Atoi was introduced in problem sets, probably in week 3 as i remember because i used it myself before week 5. In general problem sets requires sometimes more than just watching the lecture
@tonyvenice5252
@tonyvenice5252 3 ай бұрын
Yes I don't recall it either. @paikspord8358 what is problem sets ? Is it available to the general public ?
@theosiris4179
@theosiris4179 2 ай бұрын
@@tonyvenice5252 Yes, the problem sets are on the OpenCourseWare website linked in the description. Additionally, there is supplemental information, including notes, the source code written in the lectures, seminars, additional practice problems (meant to be solved after the problem sets), and other videos (called "Shorts" and "Sections").
@theosiris4179
@theosiris4179 2 ай бұрын
@@tonyvenice5252 Located in the OpenCourseWare website in the description.
@KiraIsGod
@KiraIsGod Ай бұрын
@@tonyvenice5252 you can see it in the cs50 manual or c libraries
@100drips
@100drips 5 ай бұрын
This lecture is particularly hard for me to understand. I've watched it two times and i am currently watching the "linked list" part the 4th time. Just now, i begin to understand the implementation.
@Baumwaechter
@Baumwaechter 4 ай бұрын
Dont give up bro, we've all been there
@baddiegirl4203
@baddiegirl4203 Ай бұрын
I thought I was the only one struggling with the linked list section. My brain was getting fried. difficult to keep up TT
@fakrulotaku5655
@fakrulotaku5655 6 ай бұрын
I missed the ending line, “This was CS50”
@SyariefAzman
@SyariefAzman 3 ай бұрын
i just watch about 15 minutes at a time still i have no idea what i was watching and want to sleep right away . but that not the worst part. the worst part is i even dream about this lecture and still have no idea after i woke up 🥵
@bhaskar-9000
@bhaskar-9000 3 күн бұрын
For all other videos I usually do 1.5X speed but for David here I'm finding 0.85X to be optimal :)
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 6 ай бұрын
i wish universities of this quality were in africa, india and other underdeveloped countries. the world would have been so much better then.
@unknown-nr9qs
@unknown-nr9qs 2 ай бұрын
India already have IIT
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 2 ай бұрын
@@unknown-nr9qs awful quality
@ashokkumarmuthu7750
@ashokkumarmuthu7750 5 ай бұрын
I think we can insert element in linkedlist at last with O(1) instead of o(n) by storing the last inserted node pointer in outer scope. Correct me if i am wrong.
@fynntotalwar1672
@fynntotalwar1672 3 ай бұрын
yes last node is commonly stored as well in linked list implementations
@algirdasltu1389
@algirdasltu1389 2 ай бұрын
1:13:56 im confused. Dont you get a garbage value as n->next then since you dont set it to null? If so it leaves you without a null to terminate the list... wont it just keep iterating over and over again appending garbage till it runs out of memory?
@KiraIsGod
@KiraIsGod Ай бұрын
line 32, every new node's next is set to NULL. so when you reach the last element of the linked list, you make this new element of the list to point to the new node who in turn points to NULL
@kuldeeppal7229
@kuldeeppal7229 7 ай бұрын
Today is my exam, wish me luck 🤞
@aasrp661
@aasrp661 7 ай бұрын
Yes bro good good exams. 😎
@sibusisomakema7718
@sibusisomakema7718 5 ай бұрын
if you code the middle of the list scenario before the end of the list in linked lists, make sure n->next != NULL in the IF statement
@Andrii87
@Andrii87 2 күн бұрын
It takes some time to understand those concepts.
@IPSita-i7e
@IPSita-i7e 3 ай бұрын
Could anyone tell me what is the music at the beginning?
@davidjmalan
@davidjmalan 3 ай бұрын
See soundcloud.com/cs50/cs50x-2024-original-soundtrack !
@IPSita-i7e
@IPSita-i7e 3 ай бұрын
@@davidjmalan Thanks .Obliged for these awesome lectures
@AuroraClair
@AuroraClair 2 ай бұрын
28:30 do we now have TWO pointers pounting at the same chunk of memory (1,2,3,4)? Edit: I thought free-ing list also "destroyed " it's pointer, so the 8 bytes of the pointer could also be reused?? No? ○.●
@KiraIsGod
@KiraIsGod Ай бұрын
not quite, both of the pointers point to the address of the memory of the first element, in this case the memory address of 1. every element in this case is 4 bytes (int is 32 bits). when allocating memory for list you are telling the operating system to reserve a chunk of memory for it, this can be seen as metadata in the heap of the program (which also tells you if it's a valid memory allocation), so when you free() list you are telling the operating system that that memory is now available for use, so it becomes invalid memory for the program (list still is pointing to the same memory address, but it's "dangerous" to access it since it's not memory for the program. list becomes a dangling pointer and it's a good practice to make it point to NULL after freeing it, that way you don't point to memory out of the program's scope.
@80greaty
@80greaty 9 ай бұрын
He earned my respect when he pronounced valgrind "val grinned"
@IHateMondaysToo
@IHateMondaysToo 7 ай бұрын
makes me think of norse mythology
@DebopriyoBasu
@DebopriyoBasu 11 ай бұрын
Thank you for sharing this online. Time to fix my knowledge gaps.
@AudisioOficiaI
@AudisioOficiaI 11 ай бұрын
how are you verified???
@ProgrammerPenguin
@ProgrammerPenguin 8 ай бұрын
why are you verified?
@DejaVu78
@DejaVu78 3 ай бұрын
loved this course ❤‍🩹
@budiardjo6610
@budiardjo6610 9 ай бұрын
i am glad he is using c language
@wooriwoo111
@wooriwoo111 3 ай бұрын
In the implementation code of a linked list, when creating a linked list of size 1, is it acceptable to malloc directly into 'list' without declaring a new variable n?
@bikashtamang9756
@bikashtamang9756 7 ай бұрын
even tough he is explainging in such a goood way don't know why i am not able to understand it
@King_504
@King_504 7 ай бұрын
I think he's a tad bit too animated. gotta weed through his fluff to get to the actual message he's trying to convey
@homegrownstudios5812
@homegrownstudios5812 3 ай бұрын
Is it only me who thought this lecture was so much harder than all the previous ones?? I am struggling here just comprehending the lecture here compared to all of the previous ones and its so annoying & confusing. I pray that i am not alone in this lmao
@davidjmalan
@davidjmalan 3 ай бұрын
Lecture 5 indeed tends to be the most challenging!
@homegrownstudios5812
@homegrownstudios5812 3 ай бұрын
@@davidjmalan Great to hear that im not alone and that it should get at least a bit easier! Really appreciate the reply, thanks :)
@NabayegoRebecca
@NabayegoRebecca Ай бұрын
Actually this lecture has challenged me for sure, coz am trying my level best but awww things are really tough in this week 5
@philippwiederkehr7262
@philippwiederkehr7262 8 ай бұрын
I liked the balloons demonstration!
@Nanagos
@Nanagos 11 ай бұрын
I didn't even notice until now, that David Malan is wearing the same thing all the time 😅
@AhamdMQ
@AhamdMQ 7 ай бұрын
what if we have more than one person with the same name when we're using Tries?
@optimuseaacademy
@optimuseaacademy 29 күн бұрын
are the linkedlists really condoms?
@born2fight77
@born2fight77 10 ай бұрын
hi, at the time line 27.57, do we need to free temp also,, line no 29-free(list); ,line no 30- list = tmp; here list has been assigned with tmp, line 31- as per my thoughts - free(tmp);
@ItsMidNightDev
@ItsMidNightDev 8 ай бұрын
I believe at that point 'list' now points to the memory that was allocated to 'tmp', as he set 'list = tmp' on line 30, so 'free(list)' on line 37 is basically free-ing the memory that was once allocated to tmp. I'm still learning this myself so if that's incorrect please correct me :)
@meshackmumo9246
@meshackmumo9246 5 ай бұрын
heyy you should not free the tmp, it will cause an undefined error, as long as you reassigned it back to list, the pointer(tmp) itself was carried with it to list
@Gobarshev
@Gobarshev 4 ай бұрын
I have an exam coming up hope this helps
@harshpareta-o6o
@harshpareta-o6o 2 ай бұрын
Thanks
@raksop.4490
@raksop.4490 4 ай бұрын
1:49:40 I don't really think that is making it better, if you wanted to make sure you only get positive values I guess you could put in an if statement that raises an error or something like that. This way, you just convert negative numbers to positive numbers, which could lead to you trying to access garbage values. This seems much harder to debug to me.
@KiraIsGod
@KiraIsGod Ай бұрын
look at it this way, if your hash function returns a negative value and that value is used as an index in an array, it would raise an exception.
@pridebeats1117
@pridebeats1117 4 ай бұрын
S/o to Harvard
@wanderingfido
@wanderingfido 10 ай бұрын
8:02 It's misleading to use method names _push_ and _pop_ because those are the typical functions for an array. During which the more cpu-intensive operations of shrinking and expanding the physical size/length of an array is committed. The _get()_ and _put()_ methods more accurately imply that cells/elements within the queue are _overwritten_ or non-destructively _read_ as per index values updated within _head_ and _tail_ integer variables. While the size/length of the array remains fixed according to a _CAPACITY_ value.
@Mellon00
@Mellon00 6 ай бұрын
6:00 so relatable
@abdiwelihashi1475
@abdiwelihashi1475 5 ай бұрын
my brain had a segementation fault 1:14:23
@51l3n7
@51l3n7 5 ай бұрын
same xD
@sharanya005
@sharanya005 4 ай бұрын
I guess every week atleast one person is traumatised and now came my turn
@喻國維-b2i
@喻國維-b2i 2 ай бұрын
I started to feel like that "No pun intended." is intended.
@Mellon00
@Mellon00 6 ай бұрын
1:51:31 0.26 second slower made a guy at microsoft discover a backdoor so yea xD
@nepalistories108
@nepalistories108 4 ай бұрын
When LIFO doesn't gives you cookies, Laugh 😂🤣
@Emad-nl4jk
@Emad-nl4jk 4 ай бұрын
or cry depending on which side of the spectrum you are on
@AuroraClair
@AuroraClair 2 ай бұрын
Interesting how David doesn't stop and ask if there's any questions during this whole lecture, like he did for every previous lecture...hmm, I wonder why 🤔..
@Hellmiauz
@Hellmiauz Ай бұрын
I guarante you nobody who is first hearing this class have a fukin clue of wtf is goin on.
@3rwassonst
@3rwassonst 5 ай бұрын
so nice :) ty
@BOTAimBotz
@BOTAimBotz 3 ай бұрын
Well! That was something.
@oteikwufrancis1108
@oteikwufrancis1108 11 ай бұрын
A simple question dear sir. It seems, once cursor->next is converted from NULL to n we loose the pointer to NULL. So how do we set the last element in this list to point at NULL? Me thinks the pointers if a node is created without assigning it a pointer, the pointer is implicitly set to NULL. Am I right?
@poggybitz513
@poggybitz513 11 ай бұрын
No. It could be set to garbage value. You need to explicitly set the pointer to NULL.
@oteikwufrancis1108
@oteikwufrancis1108 11 ай бұрын
Thank you sir @poggybitz513 . It seems that wasn't done in the code we were given.
@Solao926
@Solao926 4 ай бұрын
free(my brain )😮‍💨
@cfchd10
@cfchd10 3 ай бұрын
forgot ;
@brijeshparmar3908
@brijeshparmar3908 3 ай бұрын
@@cfchd10 return 1;
@cfchd10
@cfchd10 3 ай бұрын
@@brijeshparmar3908 huh?
@livingzombie4280
@livingzombie4280 12 күн бұрын
@@cfchd10//Error message telling you what code segment failed
CS50x 2024 - Lecture 6 - Python
2:09:03
CS50
Рет қаралды 421 М.
CS50x 2024 - Lecture 4 - Memory
2:17:23
CS50
Рет қаралды 324 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 433 М.
FAS Generative AI Faculty Show & Tell: Prof. David Malan, "Using CS50's AI-based Software"
15:32
Harvard Faculty of Arts and Sciences
Рет қаралды 6 М.
8 Data Structures Every Programmer Should Know
17:09
ForrestKnight
Рет қаралды 218 М.
Top 7 Data Structures for Interviews Explained SIMPLY
13:02
Codebagel
Рет қаралды 242 М.
2024's Biggest Breakthroughs in Math
15:13
Quanta Magazine
Рет қаралды 534 М.
CS50x 2024 - Lecture 7 - SQL
2:14:05
CS50
Рет қаралды 537 М.
Computer Scientist Answers Computer Questions From Twitter
14:27
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 859 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН