Skip to main content
Muhammad Ahmad's user avatar
Muhammad Ahmad's user avatar
Muhammad Ahmad's user avatar
Muhammad Ahmad
  • Member for 4 years, 2 months
  • Last seen more than a month ago
  • Pakistan
awarded
awarded
comment
Binary Search Tree - My own version of delete function
I have a question if I use iteration instead of recursion, don't you think the Big O notation will become O=(n) for searching, inserting, and deleting. You are also right that I can hit the maximum recursion limit but if I use iteration then it kinda kills the point of making a binary tree in the first place, why not make an array or list and then apply binary search over it?
Loading…
comment
Automate the Boring Stuff with Python 2nd Edition - Sandwich Maker Practice Project
@AMC yeah it was alien invasion i think where I changed the if condition for arrow keys to elif, Before that the spaceship always take 1 sec delay in response to the key i press. But after that i started responding fast, i should not have said the higher FPS because its not related to the frames, it is just the execution of the program.
comment
Automate the Boring Stuff with Python 2nd Edition - Sandwich Maker Practice Project
Yup! that was really helpful, your method reduced the coding. I remembered that how If statement slows the program execution, it will not matter in this program but when i was making few games in pygame, a lot of if statements were really giving me low FPS. thanks today i learned 2 new techniques. i never thought i can do this thing: ingredients.append(pyp.inputMenu() i never appended something like this, maybe in list comprehension but not like this.
Loading…
accepted
awarded
awarded
awarded
awarded
reviewed
Approve
asked
Loading…
awarded