Love the sound of the keyboard in the background :D
@tastypie22763 жыл бұрын
You are helping me so much with studying. I hope I will reach the level when I'm able to create a soft that likes videos automatically. Then I will launch it and set it to like all of your videos!
@y-yyy2 жыл бұрын
Thank you so much! Love your explanation of the code, very eloquent and clear.
@procyte21394 жыл бұрын
Really interesting videos! I really like it. I think the next step-up for your channel would be to improved visuals like 2D animations. Then this would be a incredible channel.
@JacobSorber4 жыл бұрын
Thanks, and I completely agree. It's always just an issue of how much time I can put into each video. Sometimes there's a little extra time for animation. Sometimes there's not.
@alexbright51402 жыл бұрын
we definitely don't want our tail dangling there 😂 5:40 AMAZING CONTENTS
@dusanmalusev95304 жыл бұрын
Wow, such a good video, maybe you can do a follow up on thread safe queue, i wish i have teachers like you in my university
@JacobSorber4 жыл бұрын
Thanks, Dusan. I'll keep it on the list. In the meantime, I hit close to that topic in my thread safety video (the bacon one) and in one of my multithreaded webserver videos.
@fallofmanbrand4 жыл бұрын
Loved It!
@marcelijankowski95933 жыл бұрын
I Love Your explanations
@vichnykh3 жыл бұрын
Really nice lesson, thank you so much!
@kubic-c31863 жыл бұрын
you could instead use a memory pool instead of malloc, and then resize it every time you ran out of space(if enqueue is called more the dequeue)
@tails_the_god2 жыл бұрын
Thanks! Great tutorial!
@karimkohel32404 жыл бұрын
YES MORE DATA STRUCTERS
@GlobalYoung72 жыл бұрын
thank you 👍
@karimkohel32404 жыл бұрын
Patiently waiting for the graph video
@JacobSorber4 жыл бұрын
I know. Thanks for your patience. Also, are you more interested in adjacency matrix or adjacency list-style graphs? I might have time to do both, but figured I would ask just in case.
@karimkohel32404 жыл бұрын
@@JacobSorber i don't know what that means so it would be awesome if we started at that point XD
@atkuriajaykumar37014 жыл бұрын
Jacob which videos I should watch to understand this better I understood theoretical part well.
@notyetdecided4 жыл бұрын
thanks
@opensourcemundo34153 жыл бұрын
Amazing video, I just don't get one thing: why do we save the head in a tmp to obtain the result? Wouldn't it be the same if I just did "int result = q->head->value" ?
@JacobSorber3 жыл бұрын
Thanks. Yes, you can definitely do that. Saving the pointer is just so you can free it, after you remove it from the queue. Whether you get the result from the temporary pointer or from q->head, doesn't matter.
@HasanBasri-vf2kg4 жыл бұрын
Dear teacher. Thanks a lot for your effort and videos. Can you take a video about semaphores, mutexes? Greetings from Turkey, İzmir👋
@enestastan71474 жыл бұрын
You can check this video of him: kzbin.info/www/bejne/b5Lbpmt5ituCgbs I don’t know if that covers all the things you are curious about.
@JacobSorber4 жыл бұрын
Thanks, Enes.
@mohammedtajir22763 ай бұрын
bro i forgot to concentrate on concept in that good background music of keyboard :)
@furball_vixie4 жыл бұрын
i love these videos, will you be doing more data structures?
@JacobSorber4 жыл бұрын
Thanks. Yes, I've got a few more on the plan for the coming weeks/months. Hoping to get to trees and queues, and hopefully some fancier structures after that.
@ChocolateMilkCultLeader4 жыл бұрын
I wish I had this last year
@JacobSorber4 жыл бұрын
Me too.
@windowsbuilderthegreat3121 Жыл бұрын
When looking at your enqueue function, it looks like it can cause a memory leak. wouldn’t it be better to dereference the value into that in the node and then free the pointer after finishing with it?
@nassar_productions4 жыл бұрын
Hello, if I created.a queue, the enqueue function has a malloc allocation, so I want to deallocate it before exiting using free(). But I can't seem to properly and successfully deallocate that? any suggestions?
@JacobSorber4 жыл бұрын
There's not enough info here to know what's going on, but I would recommend freeing the memory (the same address you got from malloc-you can use your debugger to make sure you're doing that) after you dequeue the nodes from the list.
@nassar_productions4 жыл бұрын
Yes, I figured out that freeing the head in dequeue function does the trick. Thanks !
@HuynhCongToaiK18HCM Жыл бұрын
hi, I have a question, in this specific scenario, can we replace 'q->tail = newNode' (line 36) with 'q->tail = q->tail->next' as an alternative? (because we've already assigned q->tail->next to newNode)
@MA-ek1xl2 жыл бұрын
I wasn't able to get the code to work actually. could you post them in a link in the description?
@JosephKlem12 жыл бұрын
This was super helpful, thanks, Jacob. One question: was QUEUE_EMPTY declared somewhere as an int constant? The dequeue function is supposed to return an int, so I wasn't sure how it could return something called QUEUE_EMPTY unless that somehow carried an int value. Can you explain? Thanks.
@matty21282 жыл бұрын
Most likely he set an int constant somewhere else that signifies an empty result. So early on he could have done something similar to define QUEUE_EMPTY -1. He could then have a return if statement that checks the result of what is being returned. That being said an int is still being returned.
@mariusel9916 Жыл бұрын
it was defined in the stack video as #define QUEUE_EMPTY INT_MIN... but for this you'll need
@chimichanga70334 жыл бұрын
So we are not technically removing a number from a queue its still there just moving the pointer head to the next one and printing the number on the screen, right?
@janruui55064 жыл бұрын
You are the best thank you very much I love your Videos👍👍👍👍👍👍👍👍👍 Can you make a Video and explaine this kind of code in C: int (*ptr) (int, int) = &function; And this int *ptr[10]; int (*ptrr) [10]; We had this in the lecture but I don't understand for what we use this
@JacobSorber4 жыл бұрын
Thanks. You might want to check out my videos on function pointers, double pointers, and the relationship between pointers and arrays. Might help here.
@janruui55064 жыл бұрын
@@JacobSorber thank you👍
@csbnikhil4 жыл бұрын
@@janruui5506 You can check out Demystifying Pointers - Function Pointers, by @theteachr for an animated version.
@devilminty_fresh4 жыл бұрын
Hey! Can you show us how you would implement a priority queue?
@cassiewinger70414 жыл бұрын
Priority queues are implemented using heaps (max heaps and min heaps). u gotta learn heaps first, just take a look at the wikipedia page, it'll take up to 10 mins good luck
@cassiewinger70414 жыл бұрын
awesome videos, as always thanks can you make a tutorial on how linkers work? and/or introduce some references/documents or whatever? thank you so much
@JacobSorber4 жыл бұрын
Thanks. Great suggestion. Do you have a specific linker question, because it's a pretty significant topic.
@cassiewinger70414 жыл бұрын
@@JacobSorber if you could explain the general structure/internals of object files and how linker combines object files, it'd be really great. 'cause i looked for tutorials and resources on these topics, didn't find any. make a few tutorials structure of object files and how linker combines object files. PLEASE. thanks
@cassiewinger70414 жыл бұрын
@@JacobSorber I don't generally know how linkers work myself. If you could just make one or two tutorials and point the way so I/we can learn linkers better, it'd really really great. THANKS
@JacobSorber4 жыл бұрын
@@cassiewinger7041 Ok. I'll add it to the list and see what I can do.
@cassiewinger70414 жыл бұрын
@@JacobSorber thanks a lot. can't wait
@swallace21 Жыл бұрын
great video, the typing is super loud thought, really hard to hear your voice when there is typing
@randomman52804 жыл бұрын
Hello Jacob, i hope you are healthy and safe too. I am a student and I am working on a project in which I am integrating Python code in C / C ++. There is the Cython tool that I use to generate C code so far everything is fine. The problem: The generated .c file "ther is no .h" cannot be learned at all. maybe you know how to generate a library from .c files only and also how to use them? I thank you in advance. greetings from Syria Kamil Alsaleh Alkhalil P.S. I rediscovered your channel. it's pretty helpful.
@JacobSorber4 жыл бұрын
Hi Kamil. Thanks and welcome. I'll put cython on the topic list for future videos. In the meantime, I do have a few videos about libraries. They might be able to help.
@csbnikhil4 жыл бұрын
The last few lines for enqueing are only useful for the first insertion. It's going to be wasteful until the list gets empty again. Is there a better way to achieve it?
@JacobSorber4 жыл бұрын
You could combine the two if statement blocks. That might help a little. In the end, though, the cost of this check will be really small compared to the malloc call. So, I'm not sure whether it's worth worrying about.
@gauravshinde63064 жыл бұрын
Can u do a vid in vectors in cpp
@JacobSorber4 жыл бұрын
Probably. Do you have a specific question about them, or just looking for a general overview of how they work and how to use them?
@gauravshinde63064 жыл бұрын
@@JacobSorber A general overview of them would be great as well as their applications. I know java linked lists look similar but I think everyone would like to know their applications
@HasanBasri-vf2kg4 жыл бұрын
@@JacobSorber Sir I think in channel less videos about C++ than C. Can you take tutorial videos important topics in C++? Like as friend ask, why do we need STL? Are these things advantageous or not than using own your own data structures?
@franciscrypto91432 жыл бұрын
where is the source of code of this code?
@AngryGamer-RC_Maniac4 жыл бұрын
You could have made this video far more easier mate, but you choosed a complex way with multiple typedefs which led to unnecessary notations as '->'.
@JacobSorber4 жыл бұрын
Sweet. I opened up an opportunity for you to make a simpler one. 😀
@yusraazrademirel21952 жыл бұрын
why cant i understand :(((
@ajmaln23872 жыл бұрын
ELEC 278 moment
@wocannaseilai59834 жыл бұрын
Seco d
@robertcarmona51422 жыл бұрын
was about to follow along but all my professors have told me real programmers don't use Global variables.... really bad practice
@rustycherkas82292 жыл бұрын
Pity you didn't pay attention or stick around. NO(!) "Global" vars were used or abused in this video...