## Maximise the number of toys that can be purchased with amount K

Given an array consisting of cost of toys. Given an integer K depicting the amount of money available to purchase toys. Write a program to… Read More »

Quick Links for Sorting

Sorting Terminology |

Stability in sorting algorithms |

Time Complexities of all Sorting Algorithms |

External Sorting |

Given an array consisting of cost of toys. Given an integer K depicting the amount of money available to purchase toys. Write a program to… Read More »

Given an unsorted array of length n and an integer k, find the minimum swaps to get the position of k before using the binary… Read More »

Given an array of non negative integers and a number x, find a pair in array whose product is closest to x. Examples : Input… Read More »

What is Vector of Tuple? A tuple is an object that can hold a number of elements and a vector containing multiple number of such… Read More »

Given an array of size 2 * N integers. Divide the array into N pairs, such that the maximum pair sum is minimized. In other… Read More »

A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date… Read More »

Given an array A[] of n elements and an integer k. The task is to find the number of triplet (x, y, k), where 0… Read More »

Given two arrays among which one is almost sorted with one element being in the wrong position making the array unsorted, the task is to… Read More »

Prerequisite: Merge Sort for Linked Lists Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes… Read More »

Given 2 input stacks with elements in an unsorted manner. Problem is to merge them into a new final stack, such that the elements become… Read More »

Given an array of n-positive elements. Sub-array sum is defined as the sum of all elements of a particular sub-array, the task is to find… Read More »

Given an array, task is to compute the sum of all possible maximum area rectangle which can be formed from the array elements. Also, you… Read More »

Problem – Write an assembly language program in 8086 microprocessor to sort a given array of n numbers using Selection Sort. Assumptions – The number… Read More »

Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains… Read More »

Given an array of integers, segregate even and odd numbers in the array. All the even numbers should be present first, and then the odd… Read More »