Why self.head= tmp.prev I think it should be self.head= tmp Or current.prev So if current.prev us not null self.head = current.prev once it comes out of the loop
@debojitmandal86706 күн бұрын
Then what about link bw them in reverse bcs previous head also will have current.next memory location just like reversed linked list and u dint use while loop to do it
@colyeerr7 күн бұрын
I'm having a lot of trouble trying to stop the program running mid way with ctrl + c (on windows) it just seems to keep spawning in processes and i cant stop it
@JoySenseKO7 күн бұрын
❤
@cristianocostaqueiroz298910 күн бұрын
Very didatic, clear and essential; You are at least 1000 x better than my data structutre teachers all added together. Keep up the excelent work
@souljarohill879525 күн бұрын
Not a hard problem at all in just understanding it and the solution is very simple as well. However I must admit this is the type of problem I feel like you wouldn’t understand how to solve unless you have seen it before, failed, then looked at the solution. Maybe I’m just not good enough I’ll accept that. Or I don’t understand trees as much as I thought I do. I just find it hard to believe most would know how to solve it without first failing. The trick for the max never crossed my mind. The way I would have solved it at first was to long and I knew wasn’t right. I thought about always spliting up right and left pointers of the sub tree and kept incrementing the height but knew instantly that wouldn’t work and become to complicated. Great video appreciate you breaking it down
@George-129726 күн бұрын
More than amazing explanation
@karimshakirov27 күн бұрын
Funny, I came to this video because Copilot suggested it as a new line after "...video" word
@klaudiodivulgacaodemidias771628 күн бұрын
SOU BRASILEIRO , ADOREI SEU VIDEO , E BEM O QUE EU PRECISO NO MEU CURSO , OBRIDADO
@George-1297Ай бұрын
Plz send link for the video explain init, print, all preactual coding for this target or that of swap nodes.as I can not call functions Many thanks
@ts37924Ай бұрын
WOW you explain the whole topic in such detail in such less time !! thanks alot ^^
@zapata222 ай бұрын
you are a legend! thanks for this tutorial.
@silassempra84722 ай бұрын
Excellent tutorial!! Great explanation! You rock
@misatran11073 ай бұрын
Thank you very much. Very clear lecture and explaination <3
@misatran11073 ай бұрын
Hello Mr Lucid, your lecture is very great, but there is a typo in function of postorder_print() traversal = self.postorder_print(..) instead of inorder_print, which leads to incorrect result the result should be 4-5-2-6-7-3-1 ( I hope I am right after learn your teaching ^^!)
@TechArtGenius3 ай бұрын
The height and depth concept..I think the depth at the root node is depth 0 and increases by 1 as you go down the tree. And this is the opposite for the heights. But looks like you started counting at 1 instead of 0.
@aguy98ptk3 ай бұрын
it will fail for s1="ababa" and s2="bbaaa"
@khaoulaelghiati98914 ай бұрын
Thank you so much , this saved me you deserve more than just a like and subscribe
@LucidProgramming4 ай бұрын
Cheers, glad to help!
@Ribuan_014 ай бұрын
This has been so helpful, dude. Thank you❤❤❤
@mohammodroby83465 ай бұрын
You have helped me a lot. Thank you for the tutorial
@SinghSurjeet-wq4eg5 ай бұрын
its not a correct solution when you are replacing you should use str_2=str_2.replace(c,"",1) then this will work but the time complexity will increase @lucidProgramming
@talk_to_me_in_arabic5 ай бұрын
what if we have 2 closest numbers to the target, like both are at the same distance from the target, how to get both of them?
@malika.bainazar5 ай бұрын
good video and explanation
@sarvarjuraev13765 ай бұрын
Thank you very much
@nisargbhatt49675 ай бұрын
why does the enqeueue method insert an element at first index of the list? isn't a queue FIFO?
@alessiopellegrini5235 ай бұрын
Shouldn't it be self.preorder_print(self.root, " ") in the helper function of the BinaryTree? There is no tree variable in the class and the only way the code is still running correctly is because "tree" happens to be defined outside of class, no?
@chuanjiang69316 ай бұрын
Under what condition do you recommend using Pool as opposed to Process?
@kowyo6 ай бұрын
Thank you for this video
@lazykitten43566 ай бұрын
Thank you so much for creating these data structure videos. I finally understand how to create python class and how to code linked list. Another idea for swapping two nodes is to create two empty linkedlist in the function and point those linkedlists to the nodes that to be swapped. And then just swap the data. This way we do not need to keep track of where the .next part goes and we only need to iterate through the original linkedlist once. The code looks like this: def ll_swap(self, data1, data2): if data1==data2: print('the two values are the same. Nothing to swap') return if self.ll_length() is None or self.ll_length()<2: print('not enough nodes to swap') return ll1=LinkedList() ll2=LinkedList() curr_node=self.head while curr_node: if curr_node.data==data1: ll1.head=curr_node if curr_node.data==data2: ll2.head=curr_node curr_node=curr_node.next if ll1.head and ll2.head: #swap the data of the two nodes that are marked by ll1.head and ll2.head ll1.head.data, ll2.head.data=ll2.head.data, ll1.head.data return print('the data to be swaped is not in the linked list') return
@zouhairtheadventurer34406 ай бұрын
Keep going
@burakyalcn46967 ай бұрын
this man never spend a day in his life as a developer...so much repetitive code
@Han-ve8uh7 ай бұрын
3:59 says join makes sure all processes started have SUCCESSFULLY completed. Kind of misleading. There are many ways to complete, like throwing exception is also considered complete. Key point when join is about child process/thread ending it's execution, which may or may not mean running to the last line in the script.
@Han-ve8uh7 ай бұрын
12:27 says all adds are completed before all subs. That is not true. Add a print after each function like print(f"{total.value} after add/sub") to see that it's actually interweaved and fluctuating around 490-510, but eventually ending on 500
@davidmkahler7 ай бұрын
I have looked at A LOT of python parallel videos and this is the first one that worked! I also added a print line to the serial function to confirm the output; they were consistent. Furthermore, it worked well and can be adapted easily for more advanced applications. Thank you!
@LucidProgramming7 ай бұрын
Great to hear, David. Thank you for watching!
@divyanshurana20437 ай бұрын
600th like :)
@giorgichanturia14017 ай бұрын
for future add case sensitivity
@CodeX-mhs7 ай бұрын
Extremely thankful to you sir.
@LucidProgramming7 ай бұрын
Thank you for the kind words, glad the videos are useful for you!
@CodeX-mhs7 ай бұрын
@@LucidProgramming A very welcome sir. Please keep providing. The growth doesn’t justify ur quality. Keep it up sir.
@dinohsu10198 ай бұрын
It seems multiprocessing doesn't directly work with Jupyterlab (or IPython, not sure), one workaround is to have the worker function in a separate .py file and imported. Also, I am not sure about the high level concurrent module, but I think it's important to let new multiprocessing learners know about this at the beginning, thanks.
@armans43069 ай бұрын
thanks good tutorial; tho you have a bug which is python's fault to be honest. It has allowed you to do this: return self.preorder_print(tree.root, "") ; it had to be self.root
@mindlightxd56009 ай бұрын
Man you are a genius OMG
@LucidProgramming9 ай бұрын
Well, I wouldn’t say that, but thank you for the kind words!
@vijaikumar20109 ай бұрын
nicely explained thanks for the clear explanation.
@Dharmaraj-s9f10 ай бұрын
Very nice explanation sir
@LucidProgramming10 ай бұрын
Cheers, thank you for watching!
@designordu15910 ай бұрын
thanks so much mate, been tryna wrap my head around this all day.. glad i got to watch your video
@cybertwist3r11 ай бұрын
So what happens when you have multiple cards from the same place?
@sravanidandu79411 ай бұрын
There's a bug in your code. you need to return here def append(self, data): if not self.head: self.head = Node(data) self.head.next = self.head return otherwise, it'll be stuck in infinite loop
@FahmiEshaq11 ай бұрын
Perfect
@eleos1111 ай бұрын
Unfortunately, pandoc can't scale images from screenshots correctly. For that reason images' titles are going out of the lower slide bound. Any recommendations?
@rumanaislam475811 ай бұрын
Your explanation was really amazing, you should come back make more of this awesome videos. I was confused all day about how to define the bst functions and magically youtube suggested your channel.
@LucidProgramming11 ай бұрын
That's wonderful to hear. I would love to make a comeback, but time as of now is the limiting factor. Thank you in any case for the kind words!
@rumanaislam475811 ай бұрын
@LucidProgramming Please do, teachers like you are very rare these days!
@digitalme440411 ай бұрын
@lucidProgramming Python 3.10/centos7 When I paste the code from Part 4 into my py file and run it, i get an error putrequest raise InvalidURL(f"URL can't contain control characters. {url!r} http.client.InvalidURL: URL can't contain control characters. '/youtube/v3/videos?part=snippet&id=f3FyWUG1w_M &key=' (found at least ' ')
@digitalme440411 ай бұрын
went away when I upgraded to python 3.10.13
@sohailshah1574 Жыл бұрын
Sir great tutorial ever... I don't watch such a great tutorial before that.. Sir please continue advance tutorials if possible..
@LucidProgramming Жыл бұрын
Sincerely appreciate that. If I get back to having the time, I'd love to start making videos again. Cheers!