Stacks and Queues (Python) - Data Structures and Algorithms

  Рет қаралды 49,522

Caleb Curry

Caleb Curry

Күн бұрын

Start your software dev career - calcur.tech/dev-fundamentals 💯 FREE Courses (100+ hours) - calcur.tech/all-in-ones
🐍 Python Course - calcur.tech/python-courses
✅ Data Structures & Algorithms - calcur.tech/dsa-youtube
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
✉️ Newsletter - calcur.tech/newsletter
📸 Instagram - / calebcurry
🐦 Twitter - / calebcurry
🔗 LinkedIn - / calebcurry
▶️ Subscribe - calcur.tech/subscribe
👨🏻‍🎓 Courses - www.codebreakthrough.com
~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
↪ My Amazon Store - www.amazon.com/shop/calebcurry
🅿 Patreon - calcur.tech/patreon-calebcurry
🅖 GitHub Sponsors - github.com/sponsors/CalebCurry
Ⓟ Paypal - paypal.me/calcur
🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
📈 Buy Bitcoin - calcur.tech/crypto
Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/crypto

Пікірлер: 37
@kundaichasinda9115
@kundaichasinda9115 2 жыл бұрын
"Gosh Claire, why do you always want to torment me?"
@ScornfulSix
@ScornfulSix 3 ай бұрын
Poor Claire 😭😭
@chelseypeck9573
@chelseypeck9573 Жыл бұрын
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.
@k0.9486
@k0.9486 2 жыл бұрын
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!
@janh2403
@janh2403 4 жыл бұрын
You know that you can just write data[-1] to access the last element of the list?
@ememmeme8722
@ememmeme8722 3 жыл бұрын
and who is clair?
@sakshambali3040
@sakshambali3040 3 жыл бұрын
you can use arr[ : : -1] to reverse the array
@SiphepheloMlungwana
@SiphepheloMlungwana 3 жыл бұрын
wooow!, well explained thanks man...👌
@LilJollyJoker
@LilJollyJoker 2 ай бұрын
Thank you so much for this video!
@carlosbarros6705
@carlosbarros6705 2 жыл бұрын
The best!!!! Thanks, man.
@superdahoho
@superdahoho 2 жыл бұрын
thanks caleb. you da man!
@aymammetannamyradow8407
@aymammetannamyradow8407 3 жыл бұрын
useful video. thank you
@temp3219
@temp3219 9 ай бұрын
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.
@aliceiselectric
@aliceiselectric Жыл бұрын
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!
@afshin.m8624
@afshin.m8624 10 ай бұрын
Tnx Caleb 💜
@fatimadarbandsari1870
@fatimadarbandsari1870 Ай бұрын
it was really helpful
@user-pj8ve1re6k
@user-pj8ve1re6k 8 ай бұрын
i thought pop was only used for stacks and you are supposed to use deq for queues.. can you provide clarification on this?
@mahdiataei7625
@mahdiataei7625 3 ай бұрын
Thanks❤
@mamaafrica2512
@mamaafrica2512 2 жыл бұрын
where is top or head and tail parameters?
@callmexfalcon9621
@callmexfalcon9621 Жыл бұрын
all my doubts cleared in a single vid regarding these topics
@Troglodyte2021
@Troglodyte2021 3 жыл бұрын
Clearly explained!
@dsvhs93
@dsvhs93 2 жыл бұрын
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
@varunshrivastava2706
@varunshrivastava2706 2 жыл бұрын
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?
@digital-zm
@digital-zm 2 жыл бұрын
The code is invisible
@BaconAndMinecraft
@BaconAndMinecraft 3 жыл бұрын
What IDE are you using? :)
@harambe2185
@harambe2185 3 жыл бұрын
Vsc
@mapalo111
@mapalo111 3 ай бұрын
"Gosh Claire, why do you... always want to torment me?" oh Claire😭🤣
@dickheadrecs
@dickheadrecs 2 жыл бұрын
poor claire 😢
@kvelez
@kvelez 8 ай бұрын
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()
@liana9452
@liana9452 3 жыл бұрын
Hindi ko gets
@ample982
@ample982 3 жыл бұрын
Sad
@tomcat9761
@tomcat9761 2 жыл бұрын
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
@Tech-vk2zk
@Tech-vk2zk Жыл бұрын
All my homies hate Claire
@skulves9677
@skulves9677 5 ай бұрын
toyota corrola chicken sandwich revolver god dangit
@puzzlelovers529
@puzzlelovers529 4 жыл бұрын
Can you do ASMR videos? Your voice sounds so soothing.
@wholesama3302
@wholesama3302 3 жыл бұрын
wtf
@stephenboikanyo8696
@stephenboikanyo8696 2 жыл бұрын
I dont think Claire would be comfortable with that.
Hash Tables - Data Structures and Algorithms
21:00
Caleb Curry
Рет қаралды 36 М.
Implement Queue using Stacks - Leetcode 232 - Python
15:23
NeetCodeIO
Рет қаралды 21 М.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 8 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 108 МЛН
Python dataclasses will save you HOURS, also featuring attrs
8:50
threading vs multiprocessing in python
22:31
Dave's Space
Рет қаралды 562 М.
Python Data Structures #2: Linked List
18:54
Brian Faure
Рет қаралды 411 М.
Learn Stack data structures in 10 minutes 📚
10:07
Bro Code
Рет қаралды 188 М.
Learn Queue data structures in 10 minutes 🎟️
10:07
Bro Code
Рет қаралды 106 М.
Arrays vs Linked Lists - Data Structures and Algorithms
15:59
Caleb Curry
Рет қаралды 18 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 765 М.
Unpacking Operators in Python: What are * and **?
12:35
NeuralNine
Рет қаралды 9 М.
Rust's Alien Data Types 👽 Box, Rc, Arc
11:54
Code to the Moon
Рет қаралды 136 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,1 МЛН
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 33 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 1,6 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,2 МЛН
💅🏻Айфон vs Андроид🤮
0:20
Бутылочка
Рет қаралды 736 М.