Tag: python
-
Stacks, Queues, and Linked Lists in Python
When preparing for python coding interviews, three of the most common data structures you'll need to know are stacks, queues and linked lists interviewers love them because they test your understanding of memory, order of operations and problem-solving.
In this post, we will:
- Explain each data structure in simple terms.
- Show how to implement them from scratch in python.
- Solve a few classic mini-problems you might see in interviews.
Let's dive in đ
-
List and Array in Python
The List is one of the built-in data type in Python. The four collection data types are: list, tuple, set and dictionary.
-
Mutable and Immutable types in Python
đˇ Introduction
If you're preparing for Python coding interviews, you've probably heard the terms mutable and immutable. They may sound abstract, but they play a huge role in how Python works under the hood, and understanding them can save you from subtle bugs.
in this post, we'll explore: * What mutability means in Python * Which built-in types are mutable vs immutable * Common interview pitfalls * Why this concept matters for writing clean, efficient âĻ
-
Memory Allocation in Python: Assignment vs Copy vs Deepcopy
When working with collections in Python, such as lists, dictionaries, sets, and custom objects, it's crucial to understand memory allocation. By the end of this article, you'll know the difference between assignment, shallow copying, and deep copying. You'll also be able to identify their implications on memory usage, object mutability, and time complexity.