Describe bubble sort algorithm and write an example of implementation

Bubble sort, sometimes referred to as sinking sort, is a primitive sorting algorithm that repeatedly steps through the array of elements, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm, which is a comparison sort, is named for the way smaller elements "bubble" to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems.

What is a linked list and how it works? What are advantages and disadvantages of linked lists?

A linked list is a linear collection of data elements called nodes, pointing to the next node by means of pointer. It is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of data and a reference (in other words, a link) to the next node in the sequence; but there are more complex variants, which introduce additional links. This structure allows for efficient insertion or removal of elements from any position in the sequence.

What is an algorithm?

In general, an algorithm is a sequence of well-defined instructions for solving a particular problem. Originally, algorithms were part of mathematics – the word “algorithm” comes from the Arabic writer Muhammad ibn Musa al-Khwarizmi, – but currently it is usually associated with computer science and programming.