## xyz Interview Questions

- 0of 0 votes
Design a system to support a pool of servers. The pool Api should be able to add a server, get a server (can be random) and delete a server from the pool.

You need to design and implement an interface for such pool.

The pool implementation should operate with a high performance so all operations need to be done in O(1).

- 0of 0 votes
Given the N*N matrix, find the given number in the matrix. All rows are sorted. And each row first element is less than the previous row last index.

input :

[1,3,5,7,9]

[11,13,15,16,20]

[21,22,23,24,25]

[30,32,35,40,45]

Given Num : 23

What is the best Optimal solution ? I have used BST but the interviewer asked to use any other which could do better in the above scenario.

- 0of 0 votes
Given the below input and ouput.

Input :

String[] input = {"hello", "world"};

output: (Higher count should come before and natural order)

hello : l=2, e=1,h=1,o=1

world: d=1,l=1,o=1,r=1,w=1

- 0of 0 votes
Given the below input and output and asked to write in Java.

Example 1)

input : {1,2,3,4, &, 12,13,14,15}

output : {15,14,13,12,1,2,3,4}

Example 2 )

input : {33,34,&,55,63}

output : {63,55,33,34}

Assumption : '&' will always be in the middle.

- -2of 2 votes
How to bring back ex lost love back with in 24 hours

- 0of 0 votes
Y can't user mode helper function execute ls command .

It is executing my application and even power off command.

Please let me know how user mode helper function works briefly...

- 0of 0 votes
How to annihilate twisted FB issues via Facebook Customer Service 1-877-470-3053?

- 0of 0 votes
How to Do Business On FB? Grab Facebook Customer Service 1-877-470-3053

- 0of 0 votes
How to Edit Temporary Profile Photo? Get Facebook Customer Service 1-877-470-3053

- 0of 0 votes
How to use Facebook for promotion via Facebook Customer Service 1-877-470-3053?

- 0of 0 votes
Design a movie ticketing system where ticket prices goes up or down based on demand. If no tickets were booked in the last 4 hours, the prices should fall by 10%

- -2of 2 votes
Gmail Technical support number: Maximum personality advocated making smooth communication to save your phone bill. Hence, they are addicted into in built chatting service and incredible Gmail tech support. Even through filling the accurate credential details in the form of the user name and password, establishing the user friendly communication without the error message and prompt is not easy task. If you are getting difficulty to access your account to enjoy all cheered function, then you should have to get assistance of expert through dialing Gmail technical support phone number +44-8000-9039-09. Otherwise, you will have to bear several losses in the Gmail account. Our team is offering support at nominal price value. At the peak of urgency, you should have to dial our toll free number.

for more info visit-http://www.customer-emailsupportnumber.com/gmail-support.html

- 0of 0 votes
How to print from 3rd column to till last columns using awk command in unix, if there are 'n' columns in a file.

- 0of 0 votes
Given a string consisting only of digits, find the missing number. For instance, given the string 596597598600601602 the missing number is 599. You may assume all the numbers are positive integers and the sequence increases by one at each number except the missing number. The numbers will have no more than six digits and the string will have no more than four hundred characters.

Your task is to write a function to find the missing number in the sequence. If there should no missing number whatsoever, return a value of -1

- 0of 0 votes
a = 0, b=0, c=1 are the 1st three terms. All other terms in the Lucas sequence are generated by the sum of their 3 most recent predecessors.

Write a program to generate the first n terms of a Lucas Sequence.

- 0of 0 votes
JSON PARSING ( Print all the data from a Json String).

Input : {'firstname' : 'abc'}

Output : firstname -> abc

Input : {'firstname' : 'abc', 'lastname' : 'Lincoln'}

Output : firstname -> abc lastname -> Lincoln

Input : {'address' : '365 KG', 'lastname' : 'Lincoln'}

Output : address -> 365 KG lastname -> Lincoln

Ideally, you must parse the JSON string into a map data, and then print out the elements of the map. Among other things, it will help print out the data in alphabetical order as well.

- 0of 0 votes
Find number of islands of '1' in D dimensional array containing '0', '1'. where D > 2.

- 0of 0 votes
How can save money, while moving?

- 0of 0 votes
I run ansible, but the remote machine suddenly down at the middle of the proccess? How do I fix it?

- 0of 0 votes
Running ansible with my own script (say 1.0). But, for a month later, I've updated the ansible scripts more and more. And the remote machine need to orchestrate even provision again. How do I know that I can rollback to the state of ansible script version I used?

- 0of 0 votes
An Integer array is given,

Find the combination of number in the array which satisfies the equation: a to the power b= c.

A number should not be repeated in multiple combination.

1. a and b are adjacent no. in the array.c can be any where in the array.

2.No other array or data structure can be used. However modification of current array is possible.

Define a function which will take array as input and generate a output array (a modification of input array).

Example: Input array: 1 2 3 8 5

out put: 2 3 8 0 0

- 0of 0 votes
Given a binary tree, we are supposed to find nth smallest element.

- 0of 0 votes
You have table defining meta data for all tables in your system

col name | table name | primary key| foreign key|

design a algorithm to generate sql dynamically based on column selection.

- 0of 0 votes
Write a function that will operate on a C-string and convert all instances of "AB" to "C" without using a second string for temporary storage. Use the following function signature:

void translate(char *str)

So for example:

char astring[] = "helloABworld";

translate(astring);

// Now astring holds "helloCworld";

Your function should handle strings of arbitrary length.

- 0of 0 votes
What is the maximum leads that can be generated from ad budget of 30k. Below is the table provided:

Budget 10000 20000 30000 40000 50000

Display Leads 500 1000 1200 1500 1700

SEO Leads 1000 1500 1700 1900 2500

- 1of 1 vote
WAP in java to find duplicate element in array in one scan.

- 0of 2 votes
The "Island Count" Problem

Given a 2D matrix M, filled with either 0s or 1s, count the number of islands of 1s in M.

An island is a group of adjacent values that are all 1s. Every cell in M can be adjacent to the 4 cells that are next to it on the same row or column.

Explain and code the most efficient solution possible and analyze its runtime complexity.

Example: the matrix below has 6 islands:

0 1 0 1 0

0 0 1 1 1

1 0 0 1 0

0 1 1 0 0

1 0 1 0 1

- 0of 0 votes
Given an array of both positive and negative integers , find all pairs whose sum is equal to zero.

- 0of 0 votes
Count the Mines Problem:

Your program will first read an integer N from stdin.

Then it will then read N lines of N integers separated by spaces.

Each integer in this Grid will be either 1 or 0.

The program then outputs an N x N Grid where each Grid element represents the number of 1's surrounding that element, (excluding the element itself).

For (column, row) = (0, 0), surrounding element indices are (0,1) (1,0) and (1,1).

Similarly for (1,1), surrounding element indices are (0,0) (0,1) (0,2) (1,0) (1,2) (2,0) (2,1) and (2,2).

Constraints:

Your output lines should not have any trailing or leading white space

Maximum Dimension of Grid = 1000 x 1000

Example Input:

"3 0 1 0 0 0 0 1 0 0"

Expected output:

1 0 1

2 2 1

0 1 0

- 0of 0 votes
Gmail Password Recovery Phone Number Helpline Support.?