Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Heap Mathematical Adobe

Median in a stream of integers (running integers)

Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no duplicates. For example, let...
Arrays Linked List Morgan Stanley

Swap Kth node from beginning with Kth node from end in a Linked List

Given a singly linked list, swap kth node from beginning with kth node from end. Swapping of data is not allowed, only pointers should be changed. This requirement m...
Greedy Activity Selection Problem Amazon

Activity Selection Problem Greedy Algo-1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy...
Greedy Heap Amazon

Huffman Coding Greedy Algo-3

...
Arrays Sorting Adobe

Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...
Mathematical date-time-program Morgan Stanley

Find day of the week for a given date

Write a function that calculates the day of the week for any particular date in the past or future. A typical application is to calculate the day of the week on which...
Dynamic Programming Greedy Mathematical

Coin Change DP-7

Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the cha...
Arrays Dynamic Programming Amazon

Maximum Sum Increasing Subsequence DP-14

Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the integers in the subsequence are sor...
Dynamic Programming Mathematical Accolite

Find minimum number of coins that make a given value

Given a value V, if we want to make change for V cents, and we have infinite supply of each of C = { C1, C2, .. , Cm} valued coins, what is the minimum number of coi...
Greedy Activity Selection Problem Amazon

Activity Selection Problem Greedy Algo-1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy...

Subscribe to Our Newsletter