FIFO and LIFO are commonly heard terms when discussing many different fields. It is also a popularly used method in computing and accounting. Meaning of this abbreviations are, respectively: first in, first out and last in, first out. LILO (Last In, Last Out) is synonymous with FIFO and FILO (First In, Last Out) is synonymous with LIFO.

# Algorithms & Structures questions and answers

*List of questions and answers related to algorithms and data structures. An algorithm is a set of operations, which should be performed to solve a problem.*

## 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 data structure in software development?

In computer science, data structures are abstract structures organized in particular way that are used to organize data and provide various operations upon it. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks.

## 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.