Karthikeya Boyini has Published 2383 Articles

Evaluate Postfix Expression

karthikeya Boyini

karthikeya Boyini

Updated on 17-Jun-2020 07:45:37

7K+ Views

For solving a mathematical expression, we need prefix or postfix form. After converting infix to postfix, we need postfix evaluation algorithm to find the correct answer.Here also we have to use the stack data structure to solve the postfix expressions.From the postfix expression, when some operands are found, pushed them ... Read More

Minimum Number of Jumps Problem

karthikeya Boyini

karthikeya Boyini

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

722 Views

In this problem, a list of positive integers is given. Each integer is denoting that how many maximum steps that can be made from the current element. Starting from the first element, we have to find the minimum number of jumps to reach the end item of the list.For the ... Read More

CSS max-width property

karthikeya Boyini

karthikeya Boyini

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

135 Views

The max-width property is used to set the maximum width that a box can be. The value of the max-width property can be a number, a length, or a percentage.                            This paragraph is 200px high and max ... Read More

Optimal Binary Search Tree

karthikeya Boyini

karthikeya Boyini

Updated on 17-Jun-2020 07:32:27

5K+ Views

A set of integers are given in the sorted order and another array freq to frequency count. Our task is to create a binary search tree with those data to find the minimum cost for all searches.An auxiliary array cost[n, n] is created to solve and store the solution of ... Read More

Partition problem

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

For this problem, a given set can be partitioned in such a way, that sum of each subset is equal.At first, we have to find the sum of the given set. If it is even, then there is a chance to divide it into two sets. Otherwise, it cannot be ... Read More

Maximum Length Chain of Pairs

karthikeya Boyini

karthikeya Boyini

Updated on 17-Jun-2020 07:17:54

467 Views

There is a chain of pairs is given. In each pair, there are two integers and the first integer is always smaller, and the second one is greater, the same rule can also be applied for the chain construction. A pair (x, y) can be added after a pair (p, ... Read More

Maximum sum rectangle in a 2D matrix

karthikeya Boyini

karthikeya Boyini

Updated on 17-Jun-2020 07:02:10

1K+ Views

A matrix is given. We need to find a rectangle (sometimes square) matrix, whose sum is maximum.The idea behind this algorithm is to fix the left and right columns and try to find the sum of the element from the left column to right column for each row, and store ... Read More

break, continue and label in Java loop

karthikeya Boyini

karthikeya Boyini

Updated on 17-Jun-2020 06:57:05

3K+ Views

Following example showcases labels 'first', 'second' before a for statement and use the break/continue controls to jump to that label. See the example below.ExampleLive Demopublic class Tester {    public static void main(String args[]) {       first:          for (int i = 0; i < ... Read More

Largest Sum Contiguous Subarray

karthikeya Boyini

karthikeya Boyini

Updated on 16-Jun-2020 15:40:34

653 Views

An array of integers is given. We have to find the sum of all elements which are contiguous, whose sum is largest, that will be sent as output.Using dynamic programming we will store the maximum sum up to current term. It will help to find the sum for contiguous elements ... Read More

Longest consecutive path from a given starting character

karthikeya Boyini

karthikeya Boyini

Updated on 16-Jun-2020 15:31:14

293 Views

A matrix of different characters is given. Starting from one character we have to find the longest path by traversing all characters which are greater than the current character. The characters are consecutive to each other.To find the longest path, we will use the Depth First Search algorithm. During DFS, ... Read More

Advertisements