## Selection sort

The idea of selection sort: iteratively find a smallest (or biggest) element in the remaining part of array and put […]

Common algorithms, Interview preparation## Selection sort

The idea of selection sort: iteratively find a smallest (or biggest) element in the remaining part of array and put […]

Common algorithms, Interview preparation## Bubble sort

Bubble sort algorithm is the most famous sorting algorithm as it is studied in schools, universities and various computer courses.

Common algorithms, Interview preparation## Binary search algorithm

Binary search algorithm is a widely used algorithm for sorted sequences. It can be utilized not only for searching, but

Common algorithms, Interview preparation## BFS in Graphs

The BFS algorithm in Graphs implies the following:

Common algorithms, Interview preparation## DFS in Graphs

Graph DFS algorithm is so similar to DFS in Trees. Two differences:– a graph node can have more than 2

Common algorithms, Interview preparation## BFS (iterative and recursive) in Tree

There are 2 approaches to traversing a binary tree: use Depth-First search (DFS) and Breadth-First search (BFS). In case of

Common algorithms, Interview preparation## DFS in Tree (Pre-order, In-order, Post-order)

There are 2 approaches to traversing a binary tree: use Depth-First search (DFS) and Breadth-First search (BFS). In case of

Common algorithms, Interview preparation## Implement a Binary Tree

To implement a simple binary tree, firstly we have to create a traverse function. Traverse function is used to find

Common algorithms, Interview preparation## Implement a Queue

Implementation of the Queue is so similar to a Stack. We operate with the queue using a FIFO-approach: add elements

Common algorithms, Interview preparation## Implement a Stack

Stack is also a type of LinkedList, but without the ability to retrieve i-th element. We can only retrieve (pop)