Convert the given RGB color code to Hex color code
Given three colors, such as R, G, and B, convert these RGB color to a hex color code. If the conversion is not possible, print -1....
read more
Program for Octal to Decimal Conversion
Given an octal number as input, we need to write a program to convert the given octal number into equivalent decimal number....
read more
Check if a string consists only of special characters
Given string str of length N, the task is to check if the given string contains only special characters or not. If the string contains only special characters, then print “Yes”. Otherwise, print “No”....
read more
Longest prefix which is also suffix
Given a string s, find the length of the longest prefix, which is also a suffix. The prefix and suffix should not overlap....
read more
Find the element that appears once in a sorted array
Given a sorted array in which all elements appear twice (one after one) and one element appears only once. Find that element in O(log n) complexity....
read more
Kth smallest element in a row-wise and column-wise sorted 2D array
Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D array....
read more
Sum of two elements whose sum is closest to zero
Given an integer array of N elements. You need to find the maximum sum of two elements such that sum is closest to zero....
read more
Javascript Program for Find the smallest missing number
Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array....
read more
Make Array elements equal by replacing adjacent elements with their XOR
Given an array A[] consisting of N integers, the task is to check if it is possible to reduce array of at least length 2 such that all the elements in the array are equal. In an operation, choose any index i, and replace A[i] and A[i+1] with their XOR value....
read more
Why is Binary Search log n?
Binary search is a popular algorithm used to search for an element in a sorted list efficiently. In this article we can going to understand why binary search has a time complexity of O(log2 n)....
read more
Minimum concatenation required to get strictly LIS for the given array
Given an array A[] of size n where there are only unique elements in the array. We have to find the minimum concatenation required for sequence A to get strictly Longest Increasing Subsequence. For array A[] we follow 1 based indexing....
read more
Top 50 Searching Coding Problems for Interviews
Searching in Data Structures and Algorithms (DSA) is a fundamental operation that involves finding a specific element within a collection of data. In our article “Top 50 Searching Coding Problems for Interviews“, we present a collection of essential coding challenges focused on searching algorithms. These problems are carefully selected to help you sharpen your problem-solving skills and prepare effectively for interviews. By tackling these challenges, you can enhance your understanding of searching algorithms and boost your confidence in coding interviews. Let’s begin on this journey together and master the art of searching algorithms by solving Top Searching Problems!...
read more