Divya Sahni has Published 42 Articles

XOR Linked List – A Memory Efficient Doubly Linked List

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 15:28:07

1K+ Views

Linked List The linked list is a linear data structure containing elements called nodes. Each node consists of two main components: data (payload of that node) and a pointer to the next node in the list. They are simple and efficient to use providing easy allocation and deallocation of memory. ... Read More

Sort numbers stored on different machines

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 15:12:14

354 Views

In today’s world with a large amount of data and interconnected systems, a vast amount of data is created and stored across various machines. One challenging challenge is to sort this data stored across multiple devices. Sorting being a fundamental operation in computations is used for optimal retrieval, search and ... Read More

Segment Tree | Sum of a given range

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 15:10:40

231 Views

Segment Tree A segment tree is a tree data structure used for storing intervals and segments. It is a static structure, i.e. it cannot be modified once it is built. Segment trees are used to handle range queries on an array or a similar linear data structure. In a segment tree, we ... Read More

Segment Tree | Range Minimum Query

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 15:06:10

287 Views

Segment Tree − A segment tree is a tree data structure used for storing intervals and segments. It is a static structure, i.e. it cannot be modified once it is built. Segment trees are used to handle range queries on an array or a similar linear data structure. In a segment ... Read More

Print unique rows in a given Binary matrix

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 15:01:03

204 Views

In computer science, binary matrix holds a very strong position containing a lot of information as the data is depicted using 0’s and 1’s which is the language of computers. In binary matrix, unique row refers to a row that is not identical to any other row in the matrix. ... Read More

Pattern Searching using Suffix Tree

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 14:57:58

231 Views

Trie − A trie is a tree-based data structure used to store and retrieve a dynamic set of strings. Compressed Trie − A compressed trie is a variation of the trie data structure used for storing and searching dynamic sets of strings. Memory usage is minimised by sharing common prefixes. In a ... Read More

Given a sequence of words, print all anagrams together

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 14:52:20

217 Views

Anagrams − An anagram is a word or a phrase formed by rearranging the alphabets of another word or phrase, usually once. Some examples of anagrams are given below − Top - Pot Silent - Listen Post - Stop Dog - God Problem Statement Given an array of ... Read More

Find the interval which contains the maximum number of concurrent meetings

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 14:49:01

118 Views

Given a scenario of a company where meetings are held during fixed time slots. These slots might be overlapping or distant. Thus, optimizing meeting efficiency is important in order to accommodate maximum meetings without any conflicts between schedules. In the problem given, we’ll be going through such an optimizing meeting ... Read More

Design an efficient data structure for given operations

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 14:45:34

122 Views

In order to design efficient data structures for specific operations, the time and space complexity of the given operations for the data structure created is important. Looking into some basic operations and how they can be efficiently optimized − insert() − Inserts an element to the data structure Dynamic Arrays, Hash Tables, ... Read More

Maximum level sum in N-ary Tree

Divya Sahni

Divya Sahni

Updated on 03-Nov-2023 14:39:39

159 Views

The N-ary tree is a tree data structure where each node can have a maximum of N children where N is a positive integer (N >= 0). N-ary trees are used in many applications like file systems, organizational charts and syntax trees in programming languages. Example of N-ary tree with ... Read More

Advertisements