Ankith Reddy has Published 1070 Articles

Lagrange Interpolation

Ankith Reddy

Ankith Reddy

Updated on 17-Jun-2020 08:34:36

907 Views

For constructing new data points within a range of a discrete set of given data point, the interpolation technique is used. Lagrange interpolation technique is one of them. When the given data points are not evenly distributed, we can use this interpolation method to find the solution. For the Lagrange ... Read More

Weighted Job Scheduling

Ankith Reddy

Ankith Reddy

Updated on 17-Jun-2020 07:53:36

707 Views

A list of different jobs is given, with the starting time, the ending time and profit of that job are also provided for those jobs. Our task is to find a subset of jobs, where the profit is maximum and no jobs are overlapping each other.In this algorithm, we use ... Read More

Minimum number of squares whose sum equals to given number n

Ankith Reddy

Ankith Reddy

Updated on 17-Jun-2020 07:42:14

382 Views

Any numbers can be represented by the sum of some perfect square numbers. In this problem, we need to find that how many minimum numbers of perfect square terms are needed to represent the given value.let the value is 94, so 95 = 92 + 32 + 22 + 12. ... Read More

Friend Pairing Problem

Ankith Reddy

Ankith Reddy

Updated on 17-Jun-2020 07:29:15

519 Views

In a group, there is n number of friends. Each person can remain single or be paired with some other friend. Find the total number of ways, in which friends can remain single or can be paired up.If one pair has two friends’ p and q, then (p, q) or ... Read More

Longest Palindromic Subsequence

Ankith Reddy

Ankith Reddy

Updated on 17-Jun-2020 07:21:05

826 Views

Longest Palindromic Subsequence is the subsequence of a given sequence, and the subsequence is a palindrome.In this problem, one sequence of characters is given, we have to find the longest length of a palindromic subsequence.To solve this problem, we can use the recursive formula, If L (0, n-1) is used ... Read More

Longest Bitonic Subsequence

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 15:33:35

255 Views

A sequence is said to be bitonic if it is first increasing and then decreasing. In this problem, an array of all positive integers is given. We have to find a subsequence which is increasing first and then decreasing.To solve this problem, we will define two subsequences, they are the ... Read More

Count Binary String without Consecutive 1's

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 14:57:01

589 Views

In this problem, we have to find some binary numbers which have no consecutive 1s. In a 3-bit binary string, there are three binary numbers 011, 110, 111, who have consecutive 1s, and five numbers are there which have no consecutive 1s. So after applying this algorithm to 3-bit numbers, ... Read More

Edit Distance

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 14:38:19

1K+ Views

There are two strings given. The first string is the source string and the second string is the target string. In this program, we have to find how many possible edits are needed to convert first string to the second string. The edit of strings can be either Insert some elements, ... Read More

Shortest Path in a Directed Acyclic Graph

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 14:20:59

930 Views

One weighted directed acyclic graph is given. Another source vertex is also provided. Now we have to find the shortest distance from the starting node to all other vertices, in the graph.To detect Smaller distance, we can use another algorithm like Bellman-Ford for the graph with negative weight, for positive ... Read More

Topological Sorting

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 14:05:13

6K+ Views

The topological sorting for a directed acyclic graph is the linear ordering of vertices. For every edge U-V of a directed graph, the vertex u will come before vertex v in the ordering.As we know that the source vertex will come after the destination vertex, so we need to use ... Read More

Advertisements