karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 101 of 143

Median of two sorted array

karthikeya Boyini
karthikeya Boyini
Updated on 16-Jun-2020 899 Views

Medians are the middle numbers, in other words, the median value is the middle observation in an ordered list. It corresponds to the cumulative percentage of 50%.The size of two arrays must be same, we will find the median of two separate arrays at first, then compare the separate medians to get an actual median of two lists.Input and OutputInput: Two sorted array are given. Array 1: {1, 2, 3, 6, 7} Array 2: {4, 6, 8, 10, 11} Output: The median from two array. Here the median value is 6. Merge the given lists into one. {1, 2, 3, ...

Read More

Rat in a Maze Problem

karthikeya Boyini
karthikeya Boyini
Updated on 16-Jun-2020 5K+ Views

In this problem, there is a given maze of size N x N. The source and the destination location is top-left cell and bottom right cell respectively. Some cells are valid to move and some cells are blocked. If one rat starts moving from start vertex to destination vertex, we have to find that is there any way to complete the path, if it is possible then mark the correct path for the rat.The maze is given using a binary matrix, where it is marked with 1, it is a valid path, otherwise 0 for a blocked cell.NOTE: The rat can ...

Read More

Trie of all Suffixes

karthikeya Boyini
karthikeya Boyini
Updated on 15-Jun-2020 589 Views

From the text, we can generate all suffixes to make a tree structure. We know that every pattern that presents in the text, must be a prefix of one of the possible suffix in the text. By building Trie of all suffixes, we can find any substring in linear time. Every suffix is ending with string terminating symbol. From each node if there is any path, it moves forward, otherwise returns that pattern is not found.For this algorithm, the time complexity is O(m+k), where the m is the length of string and k is the frequency of the pattern in ...

Read More

Anagram Pattern Search

karthikeya Boyini
karthikeya Boyini
Updated on 15-Jun-2020 666 Views

Anagrams are basically all permutations of a given string or pattern. This pattern searching algorithm is slightly different. In this case, not only the exact pattern is searched, it searches all possible arrangements of the given pattern in the text.To solve this problem, we will divide the whole texts into several windows of length same as patterns. Then count on each character of the pattern is found and stored in an array. For each window, we also try to find the count array, then check whether they are matching or not.The time Complexity of Anagram Pattern Search Algorithm is O(n).Input ...

Read More

Dijkstra's Algorithm for Adjacency List Representation

karthikeya Boyini
karthikeya Boyini
Updated on 15-Jun-2020 6K+ Views

There is a given graph G(V, E) with its adjacency list representation, and a source vertex is also provided. Dijkstra’s algorithm to find the minimum shortest path between source vertex to any other vertex of the graph G.To Solve this problem, we will use two lists. One is to store vertices which have been considered as the shortest path tree, and another will hold the vertices which are not considered yet. In each phase of the algorithm, we find the unconsidered vertex and which has the minimum distance from the source.Another list is used to hold the predecessor node. Using ...

Read More

Minimum Coin Change Problem

karthikeya Boyini
karthikeya Boyini
Updated on 15-Jun-2020 2K+ Views

There is a list of coin C(c1, c2, ……Cn) is given and a value V is also given. Now the problem is to use the minimum number of coins to make the chance V.Note − Assume there are an infinite number of coins CIn this problem, we will consider a set of different coins C{1, 2, 5, 10} are given, There is an infinite number of coins of each type. To make change the requested value we will try to take the minimum number of coins of any type.As an example, for value 22 − we will choose {10, 10, 2}, ...

Read More

SAP UI5 framework and comparison with JQuesry and Backbone, Angular, etc.

karthikeya Boyini
karthikeya Boyini
Updated on 15-Jun-2020 284 Views

The SAPUI5 framework is the original version of the SAP toolkit which was released initially. This version of the toolkit is a proprietary version. Later SAP released an Open source version of it named OpenUI5. Functionally it is almost equivalent in terms of basic operations negating few features but overall sufficient enough as a UI framework.This UI5 framework (applies to both SAPUI5 and OpenUI5) is capable of dispensing all major tasks expected from a full-fledged UI framework. It supports following features:Model View Controller architectureRouting engineModules with the help of module loadersFull data binding either in XML, JSON or using web ...

Read More

What is Bootstrap Plugins

karthikeya Boyini
karthikeya Boyini
Updated on 12-Jun-2020 508 Views

Bootstrap comes bundled with 12 jQuery plugins that extend the features and can add more interaction to your site.By utilizing Bootstrap Data API, most of the plugins can be triggered without writing a single line of code.Bootstrap Plugins can be included on your site in the following two forms −Individually − Using Bootstrap's individual *.js files. Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Compiled (all at once) − Using bootstrap.js or the minified bootstrap.min.js. Do not attempt to include both, as both bootstrap.js and bootstrap.min.js contain all ...

Read More

Bootstrap Form Control States

karthikeya Boyini
karthikeya Boyini
Updated on 12-Jun-2020 394 Views

Bootstrap offers to style for disabled inputs and classes for form validation, Input FocusWhen an input receives: focus, the outline of the input is removed and a box-shadow is applied.Disabled lnputsIf you need to disable an input, simply adding the disabled attribute will not only disable it; it will also change the styling and the mouse cursor when the cursor hovers over the element.Disabled FieldsetsAdd the disabled attribute to a to disable all the controls within the at once.Validation StatesBootstrap includes validation styles for errors, warnings, and success messages. To use, simply add the appropriate class to the parent element.

Read More

Java program to calculate the GCD of a given number using recursion

karthikeya Boyini
karthikeya Boyini
Updated on 13-Mar-2020 3K+ Views

You can calculate the GCD of given two numbers, using recursion as shown in the following program.Exampleimport java.util.Scanner; public class GCDUsingRecursion { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter first number :: "); int firstNum = sc.nextInt(); System.out.println("Enter second number :: "); int secondNum = sc.nextInt(); System.out.println("GCD of given two numbers is ::"+gcd(firstNum, secondNum)); } public static int gcd(int num1, int num2) { if (num2 != 0){ return gcd(num2, num1 % num2); } else{ return num1; } } }OutputEnter first number :: 625 Enter second number :: 125 GCD of given two numbers is ::125

Read More
Showing 1001–1010 of 1,421 articles
« Prev 1 99 100 101 102 103 143 Next »
Advertisements