## axaysd

BAN USER- 0of 0 votes

AnswersHow do I solve this simple geometrical programming problem?

- axaysd in United States

https://s32.postimg.org/sm75dimol/hurdle1.jpg| Report Duplicate | Flag | PURGE

Microsoft SDE1 - -1of 1 vote

AnswersThe question is in the image.

- axaysd in India

https://s32.postimg.org/xv0x002p1/mcq_1.jpg| Report Duplicate | Flag | PURGE

Amazon - 0of 0 votes

AnswersProblem : Christmas Tree

- axaysd in United States

Chirag is a boy. And his one and only dream is to meet Santa Claus. He decided to decorate a Christmas tree for Santa on coming Christmas. Chirag made an interesting Christmas tree that grows day by day.

The Christmas tree is comprised of the following

Parts

Stand

Each Part is further comprised of Branches. Branches are comprised of Leaves.

How the tree appears as a function of days should be understood. Basis that print the tree as it appears on the given day. Below are the rules that govern how the tree appears on a given day. Write a program to generate such a Christmas tree whose input is number of days.

Rules:

If tree is one day old you cannot grow. Print a message "You cannot generate christmas tree"

Tree will die after 20 days; it should give a message "Tree is no more"

Tree will have one part less than the number of days.

E.g.

On 2nd day tree will have 1 part and one stand.

On 3rd day tree will have 2 parts and one stand

On 4th day tree will have 3 parts and one stand and so on.

Top-most part will be the widest and bottom-most part will be the narrowest.

Difference in number of branches between top-most and second from top will be 2

Difference in number of branches between second from top and bottom-most part will be 1

Below is an illustration of how the tree looks like on 4th day

https://s31.postimg.org/5s1txk4zf/christmas_tree.jpg

https://s32.postimg.org/i2c6i850l/christmas_tree_2.jpg| Report Duplicate | Flag | PURGE

Google SDE1 - 1of 1 vote

AnswersAlternate sorting: Given an array of integers, rearrange the array in such a way that the first element is first maximum and second element is first minimum.

- axaysd in United States

Eg.) Input : {1, 2, 3, 4, 5, 6, 7}

Output : {7, 1, 6, 2, 5, 3, 4}| Report Duplicate | Flag | PURGE

Zoho SDE1 Algorithm - 0of 0 votes

AnswersGiven a two dimensional array of string like

- axaysd in United States

<”luke”, “shaw”>

<”wayne”, “rooney”>

<”rooney”, “ronaldo”>

<”shaw”, “rooney”>

Where the first string is “child”, second string is “Father”. And given “ronaldo” we have to find his no of grandchildren Here “ronaldo” has 2 grandchildren. So our output should be 2.| Report Duplicate | Flag | PURGE

Zoho SDE1 General Questions and Comments - 0of 0 votes

AnswersRotate the matrix elements

- axaysd in United States

For 3*3 matrix

Input

1 2 3

4 5 6

7 8 9

Output:

4 1 2

7 5 3

8 9 6

For 4*4 matrix

Input:

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

Output:

5 1 2 3

9 10 6 4

13 11 7 8

14 15 16 12| Report Duplicate | Flag | PURGE

Zoho SDE1 General Questions and Comments - 0of 0 votes

AnswerGiven a set of numbers like <10, 36, 54,89,12> we want to find sum of weights based on the following conditions

- axaysd in United States

1. 5 if a perfect square

2. 4 if multiple of 4 and divisible by 6

3. 3 if even number

And sort the numbers based on the weight and print it as follows

<10,its_weight>,<36,its weight><89,its weight>

Should display the numbers based on increasing order.| Report Duplicate | Flag | PURGE

Zoho SDE1 General Questions and Comments

Rep**alinehchavez**, SHOT 1500 NIGHT 5000 Call girls in Munirka Metro 9711794795 at AppleHi, I am Aline From New York USA. I am working as a Real estate rental agent in an Energy ...

Rep**floydmsnyder**, Theoretical mathematician at STM Auto PartsAs a Theoretical Mathematician,I’m little more interested in the theory involved with mathematics. In my free time , I ...

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window