All Stories

Big O Notation and Analysis of Algorithms - coding interview

Big O Notation is a mathematical notation that helps us analyze how complex an algorithm is in terms of time and space. When we build an application for one user...

SOLID principles: The Definitive Guide (Part I)

SOLID principles tell you how to arrange your functions into classes and how those classes should be interrelated.

Graphs: Depth-First Search

Depth-First Search (DFS), is an algorithm to search for information in Graphs.

Tree data structure: Binary Search Tree

Tree data structures are non-linear data structures, and they allow us to implement algorithms much faster than when using linear data structures.

Combinational Optimization Problem

The Knapsack problem is a classic optimization problem in computer science and mathematics. It belongs to a class of problems known as combinatorial optimization problems. The basic idea of the...

Given N, find the smallest number with the same digits

Write a method that, given an original number N, returns the smallest number with the same number of digits.