Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Data Structure and Algorithms Articles
Found 36 articles
Difference between Stack and Tree
Data structures are essential components in computer science and software engineering. Among the most commonly used are stacks and trees, both of which play a crucial role in different algorithms and systems. Though both stack and tree are non-primitive data structures, they serve different purposes and operate on distinct principles. This article will explore the key differences between stack and tree, their structures, operations, use cases and examples. What is a Stack? A stack is a linear data structure that follows the Last In, First Out (LIFO) principle. This means that the last element added to the stack ...
Read MoreSymmetric Key Algorithms
Symmetric key algorithms are cryptographic techniques that use a single shared secret key for both encryption and decryption operations. The sender encrypts data with the key, and the receiver uses the same key to decrypt it back to its original form. These algorithms form the backbone of modern cryptographic systems, offering high-speed encryption and decryption capabilities essential for secure communications, data storage, and network security protocols. Symmetric Key Encryption Process Plaintext Encrypt with Key ...
Read MoreAdvantages and Disadvantages of Hub
A hub is a basic networking device used to connect multiple devices in a network. It operates at the physical layer of the OSI model and functions as a multiport repeater, receiving data from one device and broadcasting it to all connected ports. Hubs use fiber optic or twisted pair cables and work in half-duplex mode, meaning data can only flow in one direction at a time. Hub Network Topology HUB PC1 PC2 PC3 ...
Read MoreBernoulli Distribution in Data Structures
The Bernoulli Distribution is a discrete distribution having two possible outcomes labeled by x = 0 and x = 1. The x = 1 is success, and x = 0 is failure. Success occurs with probability p, and failure occurs with probability q as q = 1 – p. So$$P\lgroup x\rgroup=\begin{cases}1-p\:for & x = 0\p\:for & x = 0\end{cases}$$This can also be written as −$$P\lgroup x\rgroup=p^{n}\lgroup1-p\rgroup^{1-n}$$Example#include #include using namespace std; int main(){ const int nrolls=10000; default_random_engine generator; bernoulli_distribution distribution(0.7); int count=0; // count number of trues for (int i=0; i
Read MoreC++ Program to Implement Trie
A Trie, also known as a prefix tree, is used to store and search for large sets of strings. In this section we will discuss all about Trie data structure, its operations, and how to implement it in C++. Trie Data Structure A Trie is a data structure similar to a tree that is used to store a dynamic set of strings. The root node represents an empty string, and each edge represents a character. The path from the root to a node represents a prefix of a string stored in the Trie. The image below show how a ...
Read MoreMost Asked Problems on Queue Data Structure in Programming Interviews
A Queue is the data structure used to store and manage the data in a specific order by following the principle of First In First Out (FIFO). The article "Most Asked Problems on Queue Data Structure in Programming Interviews" benefits you by providing good examples of every problem of the tree. It provides the problems from the basic to the hard level. It covers the core and important problems of Queue.Here is the list of queue problems to excel in the ...
Read MoreMost Asked Problems on Recursion Algorithm in Coding Interviews
Recursion Algorithm in Data Structure and Algorithms is used to call the function by itself. The article "Most Asked Problems on Recursion Algorithm in Coding Interviews" benefits you by providing good examples of every problem of the recursion. It provides the problems from the basic to the hard level. It covers the core and important problems of the recursion algorithm. The following are the main problems with the recursion algorithm − Easy Recursion Problems Print Pattern Recursively ...
Read MoreTop 50 Array Coding Problems for Programming Interviews
An array is a linear data structure that stores the data on contiguous memory locations. In this article, we will discuss the most common and popular problems of arrays in Data Structures and Algorithms. We are covering basic to advanced-level problems which will help you to learn the whole concept in a structured manner. Here is the list of problems that have been asked in programming interviews − Easy Array Problems Following are the easy array problems − ...
Read MoreMost Asked Problems on Stack Data Structure Asked in SDE Interviews
A Stack is the linear data structure used to store the elements that are inserted and removed by following the principle of Last In First Out (LIFO). The article "Most Asked Problems on Stack Data Structure Asked in SDE Interviews" covers all the problems topic-wise and includes the industry level and important questions from the interview perspective. Here are the important stack problems of Data Structure and Algorithms − Easy Stack Problems Parenthesis ...
Read MoreTop 50 Problems on Linked Lists Data Structure Asked in Coding Interviews
Linked Lists is the linear data structure that stores the data in the node. In this article, we will discuss the most common and popular problems of linked lists in Data Structures and Algorithms. We are covering basic to advanced-level problems which will help you to learn the whole concept in a structured manner. The following are the most important and best problems on linked lists − Easy LL Problems Print the Middle of a Given Linked ...
Read More