Articles on Trending Technologies

Technical articles with clear explanations and examples

Difference Between Bubble Sort and Selection Sort

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 15K+ Views

The task of arranging elements of an array in a particular order is referred to as sorting. The sorting of an array or a list is mainly done to make the searching easier. There are two types of sorting algorithms namely, Bubble Sort and Selection Sort. Bubble sort performs sorting of data by exchanging the elements, while the selection sort performs sorting of data by selecting the elements. Read this article to learn more about bubble sort and selection sort and how these two sorting techniques are different from each other. What is Bubble Sort? Bubble sort is a simple ...

Read More

Golang program to access elements from a linked list

Akhil Sharma
Akhil Sharma
Updated on 20-Feb-2023 501 Views

In Go Programming language, a linked list is a data structure which contains a node that further contains two values, the data and the next, where next points to the next node in the list. We will use two methods in this program to access elements from a linked list. In the first example iteration will be used and in the second example a variable current will be used to access the elements. Method 1: Using Iteration This program builds a linked list with three members and iterates through it to access and output each element's value. The output ...

Read More

Golang program to remove elements from the linked list

Akhil Sharma
Akhil Sharma
Updated on 20-Feb-2023 1K+ Views

In Go, a linked list is a linear data structure with pointers connecting the items, and from the first node (head) to the last node, each node can be visited (tail). We will execute the program of removing elements from the linked list using two examples. The first example uses node struct whereas the second example uses a dummy node Method 1: Using Node Struct This code creates a Node struct that has two fields: Value and Next, which links to the next node in the list. The remove_node method removes the node with the supplied value from the list ...

Read More

Golang program to add elements at first and last position of linked list

Akhil Sharma
Akhil Sharma
Updated on 20-Feb-2023 408 Views

In golang, a linked list is a unique data structure in which there is a value in the node and the next pointer which points to the next node. The list's initial node is referred to as the head, while the list's last node which points to nil depicts the end of list. We will add elements at the first and last position of the linked list using two examples. In the first example node struct will be used and in the second example ListNode struct will be used. Method 1: Using Node Struct In this method, we will use ...

Read More

Difference Between B-tree and Binary tree

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 8K+ Views

There are two types of non-linear data structures namely, B-Tree and Binary Tree. These two terms sound similar but they are absolutely different from each other. The most basic difference between a B-Tree and a Binary Tree is that a B-Tree is used for data storage on a disk, whereas a Binary Tree is used for data storage in RAM. Read this article to learn more about B-tree and Binary Tree and how they are different from each other. What is a B-Tree? B-Tree, also called Balanced Sort Tree, is a type of balanced M-way tree. In a B-tree, the ...

Read More

Golang program to implement the Queue data structure

Akhil Sharma
Akhil Sharma
Updated on 20-Feb-2023 2K+ Views

In this Golang program, a queue is a data structure that works on the First-In-First-Out (FIFO) principle where elements are added to the rear and removed from the front. Although Go doesn't come with a built-in queue data structure, slices, linked lists, and other data structures can be used to build one. We will use two methods to implement queue data structure using slices and linked list. Method 1: Using Slice Method The fundamental operations for a queue data structure: Enqueue, Dequeue, and IsEmpty are implemented in this implementation, which employs a slice to hold the items in the ...

Read More

Difference Between Array and Structure

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 19K+ Views

Arrays and Structures are two different types of container datatype. The most basic difference between an array and a structure is that an Array can contain the elements of same datatype, while a Structure is a collection that can contain the elements of dissimilar datatypes. Read this article to learn more about Arrays and Structures and how they are different from each other. What is an Array? An array refers to a collection that consists of homogenous elements, i.e. of same data type. Arrays are declared using '[]'. It uses subscripts/ '[ ]' (square brackets) to access the elements. An ...

Read More

Difference Between Array and Linked List

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 18K+ Views

The basic difference between an array and a linked list is in their structure. An array relies on the index-based data structure, whereas a liked list is based on the references. Read this article to find out more about Arrays and Linked Lists and how they are different from each other. What is an Array? An array is a consistent set of fixed number of data items. Array stores elements in contiguous memory locations. This means the specific elements can be accessed using easily calculable addresses. Hence, an array provides fast access to find element at a specific index. Another ...

Read More

Difference between Alpha and Beta Testing

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 20-Feb-2023 1K+ Views

Alpha and Beta testing are types of testing which are based on feedback from real customers using real products in real environments, but they are driven by distinct goals and processes. Read this article to find out more about Alpha and Beta testing and how they are different from each other. What is Alpha Testing? Alpha testing is the testing that is performed at the developer's site by the internal teams, before releasing the product to the external customers. The primary goal of alpha testing is basically to find bugs, and determine does the product work how it is expected ...

Read More

Golang program to create a string object

Akhil Sharma
Akhil Sharma
Updated on 20-Feb-2023 596 Views

In Golang, a string cannot be modified after they have been created. A built-in type in Go, the string type can be used in a variety of ways much like any other data type. In this article, we will use three methods to create a string object. The first method involves using of double quotes and backticks, in the second method strings.Replace() function is used and in the third method, a byte function is used to execute the program. Method 1: Using double quotes and backticks Two string objects, str1 and str2, are created in this program. Backticks (') are ...

Read More
Showing 40401–40410 of 61,297 articles
Advertisements