
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

About
Hello readers, I am a technical content engineer having expertise in front-end web development and C++.
Ravi Ranjan has Published 148 Articles

Ravi Ranjan
343 Views
In this article, we are given a binary search tree. Our task is to transform the given BST to a Greater Sum tree. A Greater Sum Tree with respect to the given BST is a tree where each node's value is replaced by the sum of all values greater ... Read More

Ravi Ranjan
12K+ Views
The binary search algorithm works on the divide and conquer principle as it keeps dividing the array in half before searching. To search for an element in an array using binary search, the array should be sorted. In the sorted array, we find the middle element and compare it with ... Read More

Ravi Ranjan
759 Views
The binary search algorithm works on the divide and conquer principle as it keeps dividing the array in half before searching. To search for an element in an array using binary search, the array should be sorted. In the sorted array, we find the middle element and compare it with ... Read More

Ravi Ranjan
3K+ Views
A linear search compares the target element with each array element, while a binary search uses divide-and-conquer method to efficiently search for the target element. In this article, we will compare linear search and binary search. What is Linear Search? Linear search is a sequential searching algorithm where we ... Read More

Ravi Ranjan
272 Views
In this article, our task is to find the number of occurrences of a given number using binary search. The binary search algorithm works on the divide-and-conquer principle as it keeps dividing the array in half before searching. To search for an element in an array using binary search, it ... Read More

Ravi Ranjan
1K+ Views
In this article, we have an array of integers. Our task is to find the maximum sum of a sub-array using divide and conquer algorithm. A sub-array is a continuous part of an array with consecutive array elements. For example: {2, 3, 4} is sub-array of {1, 2, 3, 4, ... Read More

Ravi Ranjan
545 Views
In this article, we have an array of preorder traversal of a binary search tree. Our task is to check if the given array can represent the preorder traversal of the binary search tree. In preorder traversal of tree, the root node is visited first, then the left subtree, and ... Read More

Ravi Ranjan
3K+ Views
In this article, we have a binary search tree and our task is to balance the given binary search tree. A binary search tree is a tree data structure and a special type of binary tree that follows the conditions given below: The left child ... Read More

Ravi Ranjan
1K+ Views
To convert a binary tree to a binary search tree, use the inorder tree traversal of the tree. In inorder traversal, we first traverse the left subtree, then the root node, and then the right subtree. The nodes in inorder traversal of a binary search tree are in ascending order, ... Read More

Ravi Ranjan
595 Views
In this article, we have a sorted vector of pairs. Our task is to search for a target key using binary search in the given vector of pairs. Binary Search Algorithm The binary search algorithm works on the divide-and-conquer principle as it keeps dividing the array in half before searching. ... Read More