
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming
5K+ Views
A dictionary in python is a data structure which stores a collection of key value pairs. Unlike other data structures a dictionary contains 2 value at a particular place. A dictionary is a collection which is ordered, mutable and does not allow duplicate elements. A dictionary can be created by placing a sequence of elements within curly { } brackets , separated by ‘comma’ ( , ) . Dictionary holds pairs of values, one being the key and the other corresponding pair element being its value. Values in a dictionary can be of any data type and ... Read More

424 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
6K+ Views
In Python, searching for elements within a data structure is a common task and different types of data structures should aim to provide efficient methods for searching. The problem of searching involves finding a specific element within a container and returning a value if it is not found. One data structure that can be used for this task is a tuple, which stores a collection of different types of data in a single variable. These items can be accessed by their index and Python offers various methods to work with them. Tuples are immutable, meaning that once created, they cannot ... Read More
1K+ Views
One of the most common problems in computer science is the problem of searching. To check whether a given element exists in a variable is important and sometimes the item we must search for, can be the maximum, minimum, most frequent etc. in this article we will see how we can find the largest element in a tuple. We know that tuple is a pre-defined datatype that stores heterogenous data. It is sort of a container that holds several items inside it. We can define a tuple in python using the round brackets enclosing the data that we ... Read More

947 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

320 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

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

5K+ Views
In Golang, a stack is a linear data structure that works on the Last-In-First-Out (LIFO) principle which means that the element which is pushed in the stack in last will be popped out first. We will use two methods to implement the stack data structure using slice of integers and struct. Let’s see different examples to understand the concept. Method 1: Using Slice of Integers Here, in this method, Go employs two functions, Push and Pop, to add and remove values from the top of the stack, respectively, and a slice of integers to store the values in the stack. ... Read More

3K+ Views
In Go programming language, string interpolation is the process of integrating expressions into a string literal. When it's necessary to include dynamic values in strings for log statements, error messages, and other purposes, string interpolation is frequently used. We will use two methods in this program to demonstrate string interpolation. The first example demonstrates use of sprintf and the second example shows how to use printf to execute string interpolation. Method 1: Using sprintf with fmt package In this method, the name and age variables' values are combined into a string using fmt.Sprintf() function which demonstrate interpolation. Here, Strings are ... Read More

543 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