Skip to content

algorithms

7 articles in this category.

algorithms

Daily Coding Problem Solution 4

This problem was asked by Stripe. Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that…

Abdur-Rahmaan Janhangeer

Chef

algorithms

Daily Coding Problem Solution 5

This problem was asked by Jane Street. cons(a, b) constructs a pair, and car(pair) and cdr(pair) returns the first and last element of that pair. For example, car(cons(3, 4)) returns 3, and …

Abdur-Rahmaan Janhangeer

Chef

algorithms

Daily Coding Problem Solution 3

This problem was asked by Google. Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back …

Abdur-Rahmaan Janhangeer

Chef

algorithms

Daily Coding Problem #2: Product of Array Except Self

This problem was asked by Uber and is a popular variation of array manipulation questions. The Problem Given an array of integers, return a new array such that each element at index…

Abdur-Rahmaan Janhangeer

Chef

algorithms

Daily Coding Problem #1: Two Sum Solution in Python

This problem was recently asked by Google and is a classic interview question often referred to as “Two Sum”. The Problem Given a list of numbers and a number k, return…

Abdur-Rahmaan Janhangeer

Chef

algorithms

Checking for Prime Numbers in Python

Checking if a number is prime is a fundamental programming task. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In this tutorial, we…

Abdur-Rahmaan Janhangeer

Chef

algorithms

Understanding Armstrong Numbers in Python

In this post, we’ll explore a classic beginner programming problem: Armstrong Numbers. What is an Armstrong Number? An Armstrong number (also known as a Narcissisti…

Abdur-Rahmaan Janhangeer

Chef