Ankith Reddy has Published 996 Articles

Friend Pairing Problem

Ankith Reddy

Ankith Reddy

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

726 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

2K+ 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

453 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

Edit Distance

Ankith Reddy

Ankith Reddy

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

2K+ 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

1K+ 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

7K+ 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

Bellman–Ford Algorithm for Shortest Paths

Ankith Reddy

Ankith Reddy

Updated on 16-Jun-2020 13:41:56

4K+ Views

Bellman-Ford algorithm is used to find minimum distance from the source vertex to any other vertex. The main difference between this algorithm with Dijkstra’s the algorithm is, in Dijkstra’s algorithm we cannot handle the negative weight, but here we can handle it easily.Bellman-Ford algorithm finds the distance in a bottom-up ... Read More

Create a Bootstrap progress bar with different styles

Ankith Reddy

Ankith Reddy

Updated on 15-Jun-2020 07:38:35

671 Views

Follow the below given steps to create a progress bar with different styles −Add a with a class of .progress.Next, inside the above , add an empty with a class of .progress-bar and class progress-bar-* where * could be success, info, warning, danger.Add a style attribute with the ... Read More

Style the Bootstrap modal

Ankith Reddy

Ankith Reddy

Updated on 15-Jun-2020 07:27:00

1K+ Views

Use the .modal-body class in Bootstrap to style the modal.You can try to run the following code to style modal −/p>ExampleLIve Demo           Bootstrap Example                                 ... Read More

Footer of the modal in Bootstrap

Ankith Reddy

Ankith Reddy

Updated on 15-Jun-2020 07:23:52

713 Views

To set the footer of the Bootstrap modal, use the .modal-footer class.You can try to run the following code to implement the modal-footer class −ExampleLive Demo           Bootstrap Example                           ... Read More

Advertisements