Articles on Trending Technologies

Technical articles with clear explanations and examples

Difference Between Smoke and Sanity Testing

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

Smoke testing and Sanity testing are two important types of testing in software development. Both the tests are used to validate the functionality of a software product and identify any critical issues, however they are quite different in their scope. The basic difference between the two is that smoke testing is one that ensures that the features of an application are working fine or not, whereas sanity testing is one that is performed to test whether all the errors have been fixed after the build of the application. Read this article to learn more about smoke testing and sanity ...

Read More

Golang Program to Count number of lines present in the file

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 3K+ Views

In the Go programming language, a file is a named resource for storing data that can be read from or written to. It provides a way for the program to persist data, even after the program has finished executing. Here in this article we will discuss different methods using which we can count the number of lines in a file. Method 1: Using a user-defined function In this method, we will write a go language program to count the number of lines present in the file by using bufio, fmt and os packages. Algorithm Step 1 − First, ...

Read More

Golang Program to Perform the postorder tree traversal

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 399 Views

In Go, postorder tree traversal is a technique in which the left child is visited first, then the right child, and finally the root node is the definition of the order. This order is frequently used to carry out certain activities on a tree, including releasing memory that the tree has consumed. We will implement postorder tree traversal using two methods the first one uses slices and the second one uses stacks. Syntax func append(slice, element_1, element_2…, element_N) []T The append function is used to add values to an array slice. It takes number of arguments. The first argument ...

Read More

Difference Between SIMM and DIMM

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 22-Feb-2023 6K+ Views

SIMM and DIMM are types of memory modules which are designed to eliminate the use of Dual Inline Package (DIP) chips because the installation of DIP chips is difficult. The basic difference between the two is that SIMM has only one side that is usable at a time because it has only one set of connector, whereas DIMM has different usable pins at each side. Read this article to learn more about SIMM and DIMM and how they are different from each other. What is SIMM? SIMM stands for Single In-Line Memory Module. SIMM is a type of memory module ...

Read More

Golang Program to Count number of leaf nodes in a tree

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 569 Views

In Go programming language, a tree is a data structure in which each node has a value and zero to many nodes as children. The root node is the node without a parent, while the leaf node is the node without children. Trees can be employed for a variety of tasks, including data storage, sorting, and searching in hierarchical structures. We will use two methods to count no. of leaf nodes in a tree. In the first method TreeNode struct is used whereas queue is used in the second example to execute the program. Method 1: Using TreeNode Struct This ...

Read More

Golang Program to Perform the preorder tree traversal

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

In Go programming language, pre-order traversal is a tree traversal technique in which the root node is visited first, then the left subtree, and finally the right subtree. A recursive function is used that calls itself on the root node, the left child node, the right child node, and finally the left child node again. When the node is nil, the recursion's basic case, occurs. We will execute pre-order traversal in this program using two methods- the TreeNode struct and the stacks. Method 1: Using TreeNode struct This method builds a tree node structure With a Value field, a pointer ...

Read More

Golang program to detect a loop in linked list

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 753 Views

In Golang data structures, a linked list is the one that contains nodes which contains two fields: a next pointer and the data of the list. We will use two methods to detect a loop in linked list. In the first method two-pointer approach will be used and in the second example maps are used to execute the program. Let’s go through those examples to understand the execution. Method 1: Using two-pointer approach In this method, the linked list is traversed using a low pointer and a high pointer. While the high pointer advances two steps at a time, the ...

Read More

Golang Program to Get the middle element of LinkedList in a single iteration

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 372 Views

In golang data structures , a linked list has pointers connecting the items, and from the first node (head) to the last node, each node can be visited (tail) using next pointer. We will obtain the middle element of a linked list using two methods. The first approach depicts use of two-pointer approach and the second approach uses a counter variable to execute the program. Method 1: Using two-pointer approach In this method, the function navigates the linked list using two pointers, low and high. The high pointer takes two steps at a time, whereas the low pointer takes ...

Read More

Golang Program to Iterate through Elements of Dictionary

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

In Golang, a dictionary is like a map which is a group of key-value pairs with a unique key for each value. The values can be of any type, and the keys can be of any type that is similar, such as strings or integers. We can build an empty map by using the built-in "make" function, and then add, retrieve, or update values. We will use two examples here to iterate through elements of a dictionary where in the first example loop will be used to iterate through the elements whereas in the next example slices will be used ...

Read More

Golang program to use different types of a collection

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

In Golang, a collection is a data structure that stores a number of elements, usually of the same type. The collection types in Go offers arrays, slices, maps, and channels. Slices are considered as dynamic arrays whose size can be changed whereas arrays have a fixed size. Channels give goroutines a method to communicate and synchronize their execution, whereas maps are used for key-value storage. Here, we will show execution of maps, slices and arrays using different ways as shown below in examples. Method 1: Using map, slice and array This method shows how to use arrays, slices, and maps ...

Read More
Showing 40321–40330 of 61,297 articles
Advertisements