- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Dev Prakash Sharma has Published 556 Articles
Dev Prakash Sharma
2K+ Views
Let’s Suppose we have given two strings ‘a’ and ‘b. We have to check that the given two strings are anagram of each other or not. Two Strings are said to be anagram of each other if one string contains the same character as another.For ExampleInput-1 −a= anagram b= gnaramaOutput ... Read More
Dev Prakash Sharma
478 Views
Given an array of sorted numbers containing only 0s and 1s, find the transition point. A transition point is the index of the first ‘1’ appearing in the array. For example, Input-1 −N = 6 arr[ ] = {0, 0, 0, 0, 1, 1}Output −4Explanation − Since in the given ... Read More
Dev Prakash Sharma
453 Views
Floyd Cycle is one of the cycle detection algorithms to detect the cycle in a given singly linked list.In the Floyd Cycle algorithm, we have two pointers that initially point at the head. In Hare and Tortoise’s story, Hare moves twice as fast as Tortoise, and whenever the hare reaches ... Read More
Dev Prakash Sharma
729 Views
Suppose we have an array of integers of size N and a key K. Our task is to print the top K most frequent element of the array. For example, Input-1 −N = 6 K = 2 arr[ ] = {1 ,1, 1, 2, 2, 3}Output −1 2Explanation − In ... Read More
Dev Prakash Sharma
3K+ Views
Let’s suppose we have an array of integers of size N. The task is to find the most frequent element present in the given array of integers. For example, Input-1 −N = 8 A[ ] = {1, 2, 4, 3, 3, 1, 1, 5}Output −1Explanation − In the given array ... Read More
Dev Prakash Sharma
410 Views
Let’s suppose we have given an array of unsorted integers. The task is to find the positive missing number which is not present in the given array in the range [0 to n]. For example, Input-1 −N = 9 arr = [0, 2, 5, 9, 1, 7, 4, 3, 6]Output ... Read More
Dev Prakash Sharma
332 Views
Let’s suppose we have given an array of unsorted integers. The task is to find the positive missing number which is not present in the given array in the range [0 to n]. For example, Input-1 −N = 9 arr = [0, 2, 5, 9, 1, 7, 4, 3, 6]Output ... Read More
Dev Prakash Sharma
4K+ Views
Let’s suppose we have given an array of unsorted integers of size N. The task is to find the distinct max and second max element which are present in the array. The array may contain duplicate elements also. So we have to find only distinct elements. For example, Input-1 −N ... Read More
Dev Prakash Sharma
207 Views
Suppose we have given an array of N integers having the task is to find the length of the subarray having a maximum length. If there is not any subarray whose length is maximum or sum is equal to 0 then return ‘0’. For example, Input-1 −N = 8 A[ ... Read More
Dev Prakash Sharma
359 Views
A linked list is a linear data structure that has multiple nodes that are connected with each other. Each node consists of two fields Data Field and address of the next node. Let us assume we have given a singly linked list the task is to find the kth node ... Read More
To Continue Learning Please Login
Login with Google