Programming Solutions
Hi,
Programming Solutions provides a free concept for Computer Programs. It contains videos lectures of competitive programming as well as a basic concept for beginners. It will help the user to practice competitive level programming asked in Product Based companies like Facebook, Google, Amazon, Netflix, Apple, Microsoft and others.
Sharing you some programs like:
1) Edit Distance:
In this, you have been given two strings and now you have to convert one string to another, and you can only perform three operations like Insert, Replace, Delete.
This program is done by Dynamic Programming.
In this program, you have been given some coins and an amount. Now, you have to find the minimum numbers of coins needed to reach that amount.
OR
Find the number of combinations that make up that amount.
Example: Coin : [1, 2, 5] Amount : 5
We can take one Rs 5, two Rs 2 and one Rs 1 and so on. There is four possible way. It seems to be confusing by writing similar numbers.
You can check the explanation by clicking below image:
In this program, given a list and you have to find the longest mountain.
Example: [1, 2, 2, 4, 5, 3, 2, 1, 10, 7]
Longest Mountains is: 6 [2, 4, 5, 3, 2, 1].
Because aa mountain has a peak and its left and right side must be in decreasing order. There are some more mountains like [1, 2], [1, 10, 7], but the longest is of 6 lengths.
Check the explanation here:
0 Comments
Please don't enter any spam link in comment box.
Emoji