Tag: Java

quicksort algorithm

Quicksort Algorithm with Java

The Quicksort algorithm is one of the most effective for Java and any other programming languages. It’s used behind the scenes in many JDK API methods for example. Choosing the pivot with the Quicksort Algorithm The first step to do the...

linked list

Linked List Data Structure with Java

The Linked List data structure with Java and other programming languages is a fundamental type that is highly performant for adding or removing elements. A Linked List works differently than an array. An array is stored in memory in a contiguous way...

memory allocation java

Memory Allocation with Java

Every time we create a variable, invoke a method, or create an instance memory allocation will happen in Java and any other programming language. Data is stored in the form of bits, each memory slot can hold 1 byte which is the same as 8 bits...

Hash Table Java

Hash Table Data Structure with Java

The Hash Table data structure stores keys and values into a variable in Java and other programming languages. It’s also a very common data structure vastly used in day-to-day projects and algorithms. Let’s see a simple example of how...

string data structure

String Data Structure Java

The String data structure in Java and in other programming languages behind the scenes is an array of bytes. Bytes behind the scenes are numbers that can be translated into bits or binary numbers. Those numbers correspond to a character in an...

logarithm time complexity

Logarithm Time Complexity

The logarithm time complexity is present in many algorithms and it’s very effective. Therefore, it’s important to understand how it works so we can know how performant the algorithm that has this time complexity is. In simple words, a...

big o notation

Big (O) Notation Explanation

The Big(O) Notation is a fundamental concept to help us measure the time complexity and space complexity of the algorithm. In other words, it helps us measure how performant and how much storage and computer resources an algorithm uses. Also, in any...

array data structure

Array Data Structure with Java

The array data structure is probably the most used in every application. If not directly used it’s indirectly used with ArrayList, ArrayDeque, Vector, and other classes. Simply put, an array is a data structure that stores multiple variables...

stack data structure

Stack Data Structure with Java

The stack data structure is used in many important algorithms such as depth-first search and recursive methods. A stack also uses the LIFO (Last-in Last-out) strategy which means that the last element in will be the last out. This data structure can...

queue data structure

Queue Data Structure with Java

The Queue data structure is very useful in algorithms. It’s very used when traversing graphs for example. It’s also very efficient in terms of performance to insert and remove the first or last elements. What is Queue? We can use an...