Given a cubic array made up of NxNxN smaller cubes: the cubic array is N cubes wide, N cubes deep and N cubes high.
Question: How many cubes are on ...

# Search results for array

## Cubic array

Posted by Job-Interview
Full question:
You are standing in a corridor with N closed doors. The person walks by you and opens every door. Then the second person walks by an ...

Answer
Binary search tree (BST) is a binary tree which has the following properties:
1. Tree is a binary tree
2. The left subtree of a node conta ...

**Company where asked this question:**Amazon**Interviewed for position:**SDE, SDET## Find largest subset of increasing pair in an array of integers

Posted by Job-Interview (http://codingplayground.blogspot.com)
Question:

Given an array of integers A[N], find the maximum value of (j-k) such that A[k] <= A[j] & j>k

Given an array of integers A[N], find the maximum value of (j-k) such that A[k] <= A[j] & j>k

## Design an alogrithms and data structure to retrieve median of vector (array) in constant time.

Posted by Interview
Full question:
You have a vector of signed integers and you need to support an API with two exposed methods, insert(int) and getmedian().
Describe a ...

**Interviewed for position:**SDE## Write function to implement the Binary Search algorithm on the array of integeres

Posted by Job-Interview (http://vijayinterviewquestions.blogspot.com)
Answer
Note: array should be sorted or Binary search won't work !
int binarySearch(int arr[],int size, int item)
{
int left, right, middle;
left = 0 ...

## Find largest element in array

Posted by Job-Interview
Answer in C#
public static int FindMax( int[] input )
{
int max = Int32.MinValue;
for ( int i = 0; i < input.length; i++ )
{
if ( i ...

Stack and Query structures in computing are extremely fundamental and important. Then interviewing I expect candidate to fully understand this data s ...