Problem statementGiven a binary tree containing n nodes. The problem is to find the maximum sum obtained when the tree is spirally traversed. In spiral traversal one by one all levels are being traversed with the root level traversed from right to left, then next level from left to right, ... Read More
Problem statementGiven an array of N elements and sum. We need to find size of maximum size subset whose sum is equal to given sumExampleIf input array is arr = { 2, 3, 5, 10 } and sum = 20 then output will be 4 as −2 + 3 + ... Read More
Problem statementGiven a large number as string s and an integer k which denotes the number of breakpoints we must put in the number k <= string length. The task is to find maximum segment value after putting exactly k breakpoints.ExampleExample If s = 313 and k = 1 then ... Read More
Problem statementGiven an array of N elements. The task is to remove elements from the array from left to right. However, some time is required to remove an element from the array(let us call it removal time). The time to remove an element is equal to the value of the ... Read More
Problem statementGiven n wines in a row, with integers denoting the cost of each wine respectively. Each year you can sale the first or the last wine in the row. The price of wines increases over time. Let the initial profits from the wines be P1, P2, P3…Pn. On the ... Read More
Problem statementGiven a positive integer N > 1. Find the maximum count of prime numbers whose sum is equal to given NExampleIf N = 8 then answer will be 4 as − 2 + 2 + 2 + 2 = 8AlgorithmFor maximum number of primes whose sum is equal to ... Read More
This article will guide you to understand the Zombie process and Daemons, and also help us to find the process which is running in the background.What is Zombie Process?When a process ends the execution, then it will have an exit status to report to its master process. Because of that ... Read More
Problem statementGiven an array of n integers and q queries, each query having a range from l to r. Find the maximum prefix-sum for the range l – r.ExampleIf input array is arr[] = {-1, 2, 3, -5} and queries = 2 and ranges are: l = 0, r = ... Read More
Problem statementTwo arrays A and B consisting of N elements are given. The task is to compute the maximum possible XOR of every element in array A with array BExampleIf input arrays are: arr1[] = {1, 3, 4, 12} arr2[] = {5, 9, 5, 7} then maximum possible XOR is: ... Read More
In this article, we will learn about Byobu on the Ubuntu 16.04, Byobu which is a terminal multiplexer and easy to use, Byobu is used to have multiple windows, consoles and split panes within the windows and will also show the status badges and notifications on the terminal.To complete this ... Read More