Tuesday, September 16, 2014

Fiberlink Interview Questions

1. Given an array which has marks of n student. Write a program to find rank of a student , given the marks.

Solution:   http://ideone.com/YOjkTa

Sunday, September 14, 2014

Applied Material Interview Questions

1. Create a Pyramid to print in below order:
                              A
                           BCD
                         EFGHI
                       JKLMNOP
                   QRSTUVWXYZ


Solution:     http://ideone.com/ro9L39

2. Write a program to find square root of a number upto 2 decimal places.

Solution:    http://ideone.com/0g0Se1

3. Write a function to find second largest element in an array in O(n) time.

Solution:    http://ideone.com/RjN5Kj

4. Convert a Binary Tree to Singly Linked list in place using inorder traversal.

Solution:   http://ideone.com/79Gdye

Saturday, September 13, 2014

Paypal Interview Questions

Round 1:

1. 7 Balls puzzle.  1 ball is odd among 7. Find odd ball in minimum weighing.
2. Write a function to check whether a number is prime or not. Give more than one solution.
3. What are your strengths?
4. Why do u want to leave your current company?

Round 2:

1. Explain about semaphore including what happens exactly at OS level.
2. Asked what is the toughest programming problem I have solved recently.
3. What are your strengths?
4. Why do u want to leave your current company?

Round 3:

1. Asked to give output of few C++ program.
2. Explain about virtual constructor and  virtual destructor.
Why can't we have virtual constructor?
3. Hourglass Puzzle: We have two hourglasses . One measure 7 min and another 11 mins.
Find out how to measure 9 mins using two hourglasses.

4. Write any sorting algorithm and explain.
5. Puzzle again  :-P
A grid is given. Arrange 1 to 8 in that grid in such a way that no two consecutive numbers should be placed besides each other parrallely or diagonally.


Round 4:
1. Write a function to check whether two strings are anagram of each other or not.
2. Write a function to check whether two strings are rotation of each other or not.
Solution:  http://ideone.com/OJ1oWY

3. Write a function to find all permutation of strings.
Solution:  http://ideone.com/GNkDMa

4. An array A[] and sum s is given. Find subset in array for which sum is equal to s.
  Ex: A[]={1, 3, 11, 4};
    sum =8;
 subset is {1, 3, 4}





    

Airwatch Interview Questions

  Written Test:
(10 Programming +10 Aptitude questions)
 Programming:
1.  Write a function to check if two strings are anagram of each other or not.
2. Write a function to generate all permutation of number.
3. Write a function to print union and intersection of two arrays of numbers.
4. Write a function to randomize/shuffle array of elements.
5. Write a program to implement queue using two stacks.
6. There are two threads . One prints odd and another prints even. Write a program using these two threads to print numbers in sequence i.e: 1 2 3 4 5 6 7 8 9...

Solution: http://ideone.com/dBEBBR

7. Given an array A[], and a number x, find a pair in the array whose sum equals to x.

Aptitude:
1. A book has N pages numbered from 1 to N.  The total no of digits in the page numbers are 1095. Find no of pages.
2. Relationship between legs and heads of hen and cows. Find no of cow.
3. Lake Problem. In how many days patches of lilies will get halved if it gets doubled in 48 days.

Technical Interview:

1.  Explain abstraction and polymorphism through example.
2. Difference between a, &a, &&a if a is a pointer to an integer.
3. Why constructor cannot be virtual and destructor can be virtual.
4. Say a matrix is like below:
        1   2   3
        4   5   6
        7   8   9
print elements of right diagonal.
i.e  3
     5 6
     7 8 9

Solution: http://ideone.com/k5Qq6a










Thursday, September 11, 2014

Paypal: Write string in spiral prder

Write the code that will take a string, calculate the minimum square that
will contain it and return the converted string:
String convert(String text);
convert(“paypalisthefastersaferwaytosendmoney”) should return
“paypalferwaiamonyssdyettrnesohetsafe”

The string “paypal is the faster, safer way to send money” is written in a
clockwise spiral pattern inside a square starting from the upper left
corner:
(you may want to display this pattern in a fixed font for better legibility).
P A Y P A L
F E R W A I
A M O N Y S
S D Y E T T
R N E S O H
E T S A F E
Then read line after line:
PAYPALFERWAIAMONYSSDYETTRNESOHETSAFE

Wednesday, September 10, 2014

Brocade Interview

  Telephonic Round:
  Based on C and Data structure.
1. Write a program to check if a number is power of 2 or not
2. Write a program to set and unset a particular bit
3. Write a program to check endianness of a machine.
4. Write a program to generate nth Fibonacci number.
5. Calculate size of a structure. (Wanted to check concept of structure padding)
6. Write a program to check if a binary tree is BST or not.
7. Difference between Char a[] and char *a.
8. Write a program to find out non-repeating number in an array.

Saturday, September 6, 2014

Adobe Interview Questions

1.  C Program to check for Balanced parenthesis.

2. The digits of a number are coming from a stream one by one. At any point of time, tell whether the number formed by digits are multiple of 3 or not.

Solution:  http://ideone.com/MZdpfs

3. Given a binary tree and number, return true if tree has a root to leaf path such that adding up all the values along the path will give the number. Return false if no such path can be found.

Solution:  http://ideone.com/QCIG3G

Tuesday, September 2, 2014