#### I am bored with life in java

Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is located in a town Pavlopolis. It is well known that universities provide students with dormitory for the period of university ...

#### N Stars Functions in java

In this task, you have to print n stars * vertically and n horizontally. You are given functions to complete. Donot worry about the input and ouput of functions just print n vertical stars in vertical and  ...

#### Right view of Binary tree in java

You are given a root pointer to the root of binary tree. You have to print the right view of the tree from top to bottom. Note The right view of a tree is the set of nodes that are visible from the right side. You need to complete ...

#### Flatten Binary Tree to Linked List in java

Given the root of a binary tree, flatten the tree into a "linked list": The "linked list" should use the same Node class where the right child pointer points to the next node in the list and the left child pointer is always null. The "linked l ...

#### JS Reverse in java

Given a number, you task is to reverse its digits. If the reversed number contains 0s in the beginning, you must remove them as well. Input Format Functional problem, Number is the input Output Format Output is a single line containing r ...

#### Find Target Indices After Sorting Array in java

You are given a 0-indexed integer array nums and a target element target. A target index is an index i such that nums == target. print a list of the target indices of nums after sorting nums in non-decreasing order. If there are no target indi ...

#### SORT THE HALF SORTED in java

Given an integer array of which both the first half and second half are sorted. The task is to merge two sorted halves of the array into a single sorted array. Note: The two halves can be of arbitrary sizes. Input Format line 1: contains an ...

#### Second Smallest in java

Find the 2nd smallest element in an unsorted array. Input Input consists of the first line containing integer N followed by N natural numbers for the array. Constraints: 1 <= n <= 100001 <= value of natural number <= 10000000 ...

#### Reshape the Matrix in java

In MATLAB, there is a very useful function called "reshape", which can reshape a matrix into a new one with different size but keep its original data. You are given a matrix represented by a two-dimensional array (m*n), and two positive integers ...

#### Buildings in java

There are N buildings in a row with different heights(H). You are viewing the buildings from the left and can see the roof of a building, if no building to the left of that building has height greater than equal to height of that building. You are a ...