I enjoy both kinds of videos you do. In person, and actually coding. I love the switch up of content. Really helps me pay attention and learn items from different perspectives.
What troubling me was why in python we just use an array for a stack for just pop and push, when you can just get array[ 2] or [3] easily. The fact that you mentioned "we just have to limit its usage to make it work like a stack" is what cleared my head. LOL. And the stack implementation using the class at the end was perfect. Thank you dowg.
Really helpful video, and I watched quite a few others before this one. Yours had the perfect balance between being objective but also not superficial. Thanks!
Don't worry man, Let me suggest you THE BEST dsa course on java. Just search Kunal Kushwaha on youtube. I can guarantee you , you are gonna love it . Its literally the best course out there. But still don't listen to me just give it a try. And one last thing do give me reviews whether you like that or not, will ya?
Basta pre pag Stacks = LIFO. Meaning kung ano ung last element, aun lagi ung magagalaw (append/push, or ma-pop, or peek). Sa queue naman = FIFO. Kung ano ung una, ayun ung matatanggal. (append/push
I enjoy both kinds of videos you do. In person, and actually coding. I love the switch up of content. Really helps me pay attention and learn items from different perspectives.
"Gosh Claire, why do you always want to torment me?"
Poor Claire 😭😭
I think there is a lot of value derived from both the conceptual and hands on, I'd suggest staying with both for different types of learners!
You know that you can just write data[-1] to access the last element of the list?
and who is clair?
you can use arr[ : : -1] to reverse the array
What troubling me was why in python we just use an array for a stack for just pop and push, when you can just get array[ 2] or [3] easily. The fact that you mentioned "we just have to limit its usage to make it work like a stack" is what cleared my head. LOL. And the stack implementation using the class at the end was perfect. Thank you dowg.
Really helpful video, and I watched quite a few others before this one. Yours had the perfect balance between being objective but also not superficial. Thanks!
class Stack:
def __init__(self, limit):
self.stack = []
self.limit = limit
def get_length(self):
return len(self.stack)
def push_stack(self, data):
if self.get_length() < self.limit:
self.stack.append(data)
else:
raise Exception("Stack is full")
def pop_stack(self):
if self.get_length() > 0:
self.stack.pop()
else:
raise Exception("Stack is empty")
def insert_at(self, index, data):
if self.get_length() < self.limit:
self.stack.insert(index, data)
else:
raise Exception("Invalid stack insertion")
def remove_at(self, index):
if self.get_length() > 0:
self.stack.pop(index)
else:
raise Exception("Invalid stack removal")
def show_stack(self):
print(self.stack)
def peek_stack(self):
print(self.stack[-1])
stack = Stack(limit=6)
stack.push_stack("a")
stack.push_stack("b")
stack.push_stack("c")
stack.insert_at(1, "z")
stack.remove_at(3)
stack.pop_stack()
print(stack.get_length())
stack.peek_stack()
stack.show_stack()
wooow!, well explained thanks man...👌
Thank you so much for this video!
Can someone point me to the class implementation of the queue? Great vid Caleb. Thanks!
thanks caleb.
you da man!
queues in 4:47
all my doubts cleared in a single vid regarding these topics
i thought pop was only used for stacks and you are supposed to use deq for queues.. can you provide clarification on this?
Tnx Caleb 💜
Helpful content
it was really helpful
"Gosh Claire, why do you... always want to torment me?" oh Claire😭🤣
useful video. thank you
Thanks❤
where is top or head and tail parameters?
Caleb I beg of you to make one of these for Java lol I feel like they would be super similar but I also get confused
Don't worry man, Let me suggest you THE BEST dsa course on java. Just search Kunal Kushwaha on youtube. I can guarantee you , you are gonna love it . Its literally the best course out there. But still don't listen to me just give it a try. And one last thing do give me reviews whether you like that or not, will ya?
That claire part got me
Clearly explained!
What IDE are you using? :)
Vsc
The code is invisible
All my homies hate Claire
toyota corrola chicken sandwich revolver god dangit
Hindi ko gets
Sad
Basta pre pag Stacks = LIFO. Meaning kung ano ung last element, aun lagi ung magagalaw (append/push, or ma-pop, or peek).
Sa queue naman = FIFO. Kung ano ung una, ayun ung matatanggal. (append/push
Can you do ASMR videos? Your voice sounds so soothing.
wtf
I dont think Claire would be comfortable with that.
Absolute garbage. A stack is not a list. If you don’t know how to do it, don’t do it.
The best!!!! Thanks, man.