George John has Published 1081 Articles

Decimal to Binary conversion

George John

George John

Updated on 17-Jun-2020 08:24:51

1K+ Views

A decimal number can also be converted into its binary form. To convert a decimal number to binary number, we need to divide the number by 2 until it reaches 0 or 1. And in each step, the remainder are stored separately to form the binary equivalent number in reverse ... Read More

Ugly Numbers

George John

George John

Updated on 17-Jun-2020 08:04:29

4K+ Views

Ugly numbers are those number whose prime factors are 2, 3 or 5. From 1 to 15, there are 11 ugly numbers 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15. The numbers 7, 11, 13 are not ugly because they are prime. The number 14 is not ... Read More

Palindrome Partitioning

George John

George John

Updated on 17-Jun-2020 07:22:59

462 Views

In this algorithm, the input is a string, a partitioning of that string is palindrome partitioning when every substring of the partition is a palindrome.In this algorithm, we have to find the minimum cuts are needed to palindrome partitioning the given string.Input and OutputInput: A string. Say “ababbbabbababa” Output: Minimum ... Read More

Maximum Sum Increasing Subsequence

George John

George John

Updated on 17-Jun-2020 07:03:35

553 Views

Maximum Sum Increasing subsequence is a subsequence of a given list of integers, whose sum is maximum and in the subsequence, all elements are sorted in increasing order.Let there is an array to store max sum increasing subsequence, such that L[i] is the max sum increasing subsequence, which is ending ... Read More

Largest Independent Set Problem

George John

George John

Updated on 16-Jun-2020 15:44:45

425 Views

The Independent Set is the subset of all binary tree nodes when there is no edge between any two nodes in that subset. Now from a set of elements, we will find the longest independent set. i.e. If the elements are used to form a binary tree, then all largest subset, ... Read More

Longest Increasing Subsequence

George John

George John

Updated on 16-Jun-2020 15:27:18

2K+ Views

Longest Increasing Subsequence is a subsequence where one item is greater than its previous item. Here we will try to find Longest Increasing Subsequence length, from a set of integers.Input and OutputInput: A set of integers. {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, ... Read More

Snake and Ladder Problem

George John

George John

Updated on 16-Jun-2020 14:12:48

2K+ Views

We know about the famous game Snake and Ladder. In this game, some rooms are present on the board, with the room number. Some rooms are connected with a ladder or with snakes. When we get a ladder, we can climb up to some rooms to reach near to the ... Read More

Transitive closure of a Graph

George John

George John

Updated on 16-Jun-2020 13:54:00

20K+ Views

Transitive Closure it the reachability matrix to reach from vertex u to vertex v of a graph. One graph is given, we have to find a vertex v which is reachable from another vertex u, for all vertex pairs (u, v).The final matrix is the Boolean type. When there is ... Read More

Set large modal in Bootstrap

George John

George John

Updated on 15-Jun-2020 07:18:34

2K+ Views

Use the .modal-lg class in Bootstrap to set large modal with more width.You can try to run the following code to set large modal;ExampleLive Demo           Bootstrap Example                             ... Read More

Bootstrap Collapsible in

George John

George John

Updated on 15-Jun-2020 07:05:55

240 Views

The collapsible in class in Bootstrap is used to display the collapsible content.You can try to run the following code to implement the collapsible in class −ExampleLive Demo           Bootstrap Example                         ... Read More

Advertisements