## Queries to find the left-most given type integer in a binary array

Given a binary array arr[], the task is to design a data structure that supports the following operations in O(1). Type 1: Remove and print… Read More »

- Rearrange numbers in an array such that no two adjacent numbers are same
- Minimum operations required to make every element greater than or equal to K
- Maximum possible sub-array sum after at most X swaps
- Maximise the number of toys that can be purchased with amount K using min Heap
- XOR of K smallest prime and composite numbers from the given array
- Queries to find the left-most given type integer in a binary array

Given a binary array arr[], the task is to design a data structure that supports the following operations in O(1). Type 1: Remove and print… Read More »

Given an array arr[] of N non-zero positive integers and an integer K, the task is to find the XOR of the K largest prime… Read More »

Given an array arr[] consisting of the cost of toys and an integer K depicting the amount of money available to purchase toys. The task… Read More »

Given an array of length N. The task is to convert it into a sequence in which all elements are greater than or equal to… Read More »

Given an array of integers. The task is to rearrange elements of the array such that no two adjacent elements in the array are same.… Read More »

Given an array arr[] of N integers and an integer X, the task is to find the maximum possible sub-array sum after applying at most… Read More »

Given an array arr[] of N integers from 1 to N. The task is to perform the following operations N – 1 times. Select two… Read More »

Given an array of strings and an array of integers where ith integer of the array corresponds to the value of the ith string present… Read More »

Given a connected graph with N vertices and M edges. The task is to find the shortest path from source to the destination vertex such… Read More »

Given N elements, you can remove any two elements from the list, note their sum and add the sum to the list. Repeat these steps… Read More »

Given a connected graph with N vertices and M edges. The task is to print the lexicographically smallest BFS traversal of the graph starting from… Read More »

Given a binary tree and an integer b representing budget. The task is to find the count of maximum number of leaf nodes that can… Read More »

Given a max-heap of size n, find the kth greatest element in the max-heap. Examples: Input : maxHeap = {20, 15, 18, 8, 10, 5,… Read More »

Given a min-heap of size n, find the kth least element in the min-heap. Examples: Input : {10, 50, 40, 75, 60, 65, 45} k… Read More »

A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to the values in the… Read More »