## LongStream toArray() in Java

LongStream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a… Read More »

## DoubleStream toArray() in Java

DoubleStream toArray() returns an array containing the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a… Read More »

## Find largest d in array such that a + b + c = d

Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b,… Read More »

## DoubleStream reduce(DoubleBinaryOperator op) in Java

DoubleStream reduce(DoubleBinaryOperator op) performs a reduction on the elements of this stream, using an associative accumulation function, and returns an OptionalDouble describing the reduced value,… Read More »

## Java log10() with example

The java.lang.Math.log10() is one of the Java Math Library method which is used to return the base 10 logarithmic value of given double value as… Read More »

## Color game using Tkinter in Python

Prerequisite : Python GUI Tkinter TKinter is widely used for developing GUI applications. Along with applications, we can also use Tkinter GUI to develop games.… Read More »

## Tetrahedral Numbers

A number is termed as a tetrahedral number if it can be represented as a pyramid with a triangular base and three sides, called a… Read More »

## Reversing a queue using recursion

Given a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue()… Read More »

## Sum of nodes at maximum depth of a Binary Tree

Given a root node to a tree, find the sum of all the leaf nodes which are at maximum depth from root node. Example: 1… Read More »

## ISRO | ISRO CS 2015 | Question 24

Given the following expression grammar: E → E ∗ F ∣ F + E ∣ F F → F − F ∣ id Which of… Read More »

## Computer Organization | Booth’s Algorithm

Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation in efficient way, i.e., less number of additions/subtractions required. It operates… Read More »

## ISRO | ISRO CS 2015 | Question 23

Consider the following schema: Emp (Empcode, Name, Sex, Salary, Deptt) A simple SQL query is executed as follows: SELECT Deptt FROM Emp WHERE sex =… Read More »

## ISRO | ISRO CS 2015 | Question 22

Consider the following relational schema: Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) Consider the following relational query on the above database: SELECT… Read More »

## ISRO | ISRO CS 2015 | Question 21

If D1, D2…Dn are domains in a relational model, then the relation is a table, which is a subset of (A) D1⊕D2⊕…⊕Dn (B) D1xD2x…xDn (C)… Read More »

## Sum of Interval and Update with Number of Divisors

Given an array A of N integers. You have to answer two types of queries : 1. Update [l, r] – for every i in… Read More »