coderz.py

Keep Coding Keep Cheering!

Introduction to Singly Linked List

Singly Linked List Singly Linked List is a linear and connected data structure made of Nodes. Each node is composed of a variable data where its content (actual value) is stored and a pointer to the next Node (next node location) on the list. The Linked List has a pointer to the first element of this Node […]

March 27, 2022 | Data Structure | No comments

Reverse a String in Python

This interview question requires you to reverse a string using recursion. Make sure to think of the base case here.

November 7, 2020 | Algorithm, Data Structure, python | No comments

Implement a Queue Using Two Stacks in Python

Given the Stack class below, implement a Queue class using two stacks

October 21, 2020 | Data Structure, python | No comments

Balanced Parentheses Check in Python

Given a string of opening and closing parentheses, check whether it’s balanced. We have 3 types of parentheses: round brackets: (), square brackets: [], and curly brackets: {}.

October 12, 2020 | Algorithm, Data Structure, python | No comments

Largest Continuous Sum in Python

Given an array of integers (positive and negative) find the largest continuous sum.

October 2, 2020 | Algorithm, Data Structure, python | No comments

Find the Missing Element in Python

Consider an array of non-negative integers. A second array is formed by shuffling the elements of the first array and deleting a random element. Given these two arrays, find which element is missing in the second array.

September 28, 2020 | Algorithm, Data Structure, python | No comments

Big-O Complexity for Python Data Structures

Big-O Complexity for Python Data Structures

September 20, 2020 | Algorithm, Data Structure, python | No comments

Algorithm Big-O Notation Examples

Big-O (in its simplest form) reduces the comparison between algorithms to a single variable. That variable is chosen based on observations or assumptions

September 19, 2020 | Algorithm, Data Structure | No comments

Linked List Reversal in Python

Write a function to reverse a Linked List in place. The function will take in the head of the list as input and return the new head of the list.

September 15, 2020 | Data Structure, python | No comments

Linked List Nth to Last Node in Python

Write a function that takes a head node and an integer value n and then returns the nth to last node in the linked list. For example, given:

September 13, 2020 | Data Structure, python | No comments

Advertisement