Queue

Queue

Fundamentals A type of linear data structure Queues’ operations are subset of Arrays Can only add element (tail) from one end and remove element from the other end (head) First in First out

Read More

Stack

Stack

Fundamentals Implementation I will implement a stack with the help of the dynamic array I built before Dynamic Array Code class Array: def init(self, arr=None, capacity=10): if isinstanc

Read More

112. Path Sum

112. Path Sum

Problem Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children. Ex

Read More

Array

Array

What are arrays? A data structure that stores data in a continuous space For python, the most commonly used array-like data structure is list For Python, list can hold different types of data To acce

Read More