**Huawei Interview Questions for Freshers 2016-2017 – Bangalore Job Seeker**

**#STRATEGY1 : SOLVE PUZZLE**

Ant and Triangle Problem Three ants are sitting at the three corners of an equilateral triangle. Each ant starts randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide?

2. Crossing the Bridge Puzzle Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge?

3. Burning Rope Problem A man has two ropes of varying thickness (Those two ropes are not identical, they aren’t the same density nor the same length nor the same width). Each rope burns in 60 minutes. He actually wants to measure 45 mins. How can he measure 45 mins using only these two ropes. He can’t cut the one rope in half because the ropes are non-homogeneous and he can’t be sure how long it will burn.

4. Heaven’s Gate Probelm You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar. You can only ask one question to one of them in order to find the way to heaven. What is the question?

5. 10 Coins Puzzle You are blindfolded and 10 coins are place in front of you on table. You are allowed to touch the coins, but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. How do you make two piles of coins each with the same number of heads up? You can flip the coins any number of times.

6. King and Wind Bottles Puzzle A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine. Fortunately (or say unfortunately) the bad king’s guards catch the servant after he has only poisoned one bottle. Alas, the guards don’t know which bottle but know that the poison is so strong that even if diluted 100,000 times it would still kill the king. Furthermore, it takes one month to have an effect. The bad king decides he will get some of the prisoners in his vast dungeons to drink the wine. Being a clever bad king he knows he needs to murder no more than 10 prisoners – believing he can fob off such a low death rate – and will still be able to drink the rest of the wine (999 bottles) at his anniversary party in 5 weeks time. Explain what is in mind of the king, how will he be able to do so ?

7. Mislabeled Jar Puzzle You have 3 jars that are all mislabeled. One jar contains Apple, another contains Oranges and the third jar contains a mixture of both Apple and Oranges. You are allowed to pick as many fruits as you want from each jar to fix the labels on the jars. What is the minimum number of fruits that you have to pick and from which jars to correctly label them?

8. Red and Blue marbles Puzzle You have two jars, 50 red marbles and 50 blue marbles. You need to place all the marbles into the jars such that when you blindly pick one marble out of one jar, you maximize the chances that it will be red. When picking, you’ll first randomly pick a jar, and then randomly pick a marble out of that jar. You can arrange the marbles however you like, but each marble must be in a jar.

9. Gold Bar Problem You’ve got someone working for you for seven days and a gold bar to pay him. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. What and where are the fewest number of cuts to the bar of gold that will allow you to pay him 1/7th each day?

10. 100 Doors Puzzle You have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), ec, until you only visit the 100th door. What state are the doors in after the last pass? Which are open which are closed?

Some more puzzles:

How to cut a circle cake into 8 parts by only 3 cuts….

Four frnds r their one take 4 min to reach a fixed destination…..second take 10 min third take 8 min fourth take 10 min at one time 2 can go what is the minimum time require to reach their

Marbles problem:3 marble jar are their contains red green+red red+ blue+green….light goes off…sticker exchange….what is the minimum attempt to tell which jar have which sticker….

**#STRATEGY 2:**

GO THROUGH DATA STRUCTURE CONCEPT….

MAINLY DOUBLY AND CIRCULAR LINKED LIST..

INSERTION,DELETION,FIND MIDDLLE NODE

HOW TO PASS STRUCTURE IN A FUNCTION

JAVA:OVVERDING,OVERLOADING,MULTITHREADING,EXCEPTION,INTERFACE,ABSTRACT CLASS

IMPLEMENT ALL OOPS CONCEPT IN SINGLE PROGRAM,WHAT IS SDLC

#STRATEGY_3:YOUR RESUME

PREPARE WELL FOR UR PROJECT

#STRATEGY_4:

C LANG FUNDAMENTAL:

1.PRINT TRIANGLE:

$

$ $

$ $ $

$ $ $ $

$ $ $ $ $

2.Diagonally printing of stars in JAVA

public class pattern9

{

public static void main(String arg[])

{

int i,j;

for(i=1;i<=10;i++)

{

for(j=0;j<10-i;j++)

{

System.out.print(“\t”);

}

System.out.print(“*\n”);

}

}

}

POINTER OUTPUT BASED QUESTION:

ONE OF THE ANSWER IS:AAA …..BBB….CCC

INCREMENT DECREMENT OPERATOR OUTPUT BASED QUESTION

STATIC VARIABLE OUTPUT BASED QUESTION:

ANSWER IS:

5,4,3,2,1

AND LAST ONE IS TERNARY OPERATOR OUTPUT BASED QUESTION

******************************************

1) Difference and between malloc() and calloc() nd its use..

2) difference bet structure and union..

3)WAP to open and close the file

4)what is inheritance, polymorphism,threading

5) Select comes in which language. (DQL)

6)how to create index.

7)Exception handling-checked and unchecked , hierarchy of exception diagram

8)String mutability with explanation

9)how we achieve abstraction in java. with example.

10) what is role of team leader. tasks of Team Leader.

11)where u see urself after 5 years.

12) WAP to prinT (M X N)+(M X N)

13)about company.

14)what is DFD, Sequence, class Diagram nd all diagrams.., how u map these diagram into ur code in java..

15)what is dyanmic binding with explanation

16)Compile time nd runtime polymorphism.. with 3-4 lines of code

17) memory area linked question.

18)what is designing , phase of designing,

Hope this will help u..

=====================================================================

Hope this helps !!

Feel free to contact. & share the notes to as many people as possible, never hesitate in sharing Knowledge 🙂

**Remember : **Don’t forget to **Subscribe** our site for Daily Walkins/Updates/off campus drive/Referral Drives/Tips/Placement Papers /Study Materials .

**Good Luck Friends!!!**

**God is always with you. **

**With Best wishes and Best Regards,**

**Admin **

**Adroit Joy **

If you have any problems,need any suggestions,need any interview questions,Please Ask me here :

**BJS Bangalore Job Seeker**

**Happy to Help you 🙂**