## Recent Interview Questions

- 0of 0 votes
Today is Monday. After 61 days, it will be:

A. Wednesday B. Saturday C. Tuesday D. Thursday

- 0of 0 votes
If x and y are the two digits of the number 653xy such that this number is divisible by 80, then x + y =?

A. 2 or 6 B. 4 C. 4 or 8 D. 8

- 0of 0 votes
The least number of complete years in which a sum of money put out at 20% compound interest will be more than doubled is:

A. 3 B. 4 C. 5 D. 6

- 0of 0 votes
The cost price of 20 articles is the same as the selling price of x articles. If the profit is 25%, then the value of x is:

A. 15 B. 16 C. 18 D. 25

- 0of 0 votes
Which one of the following is a static member of thread?

A. current thread()

B. getName()

C. join()

D. interrupt

- 0of 0 votes
The order of the top three level elements of the java source file is

A. import, package, class B. class,import,package C. package, order, class D. random order

- 0of 0 votes
What will be the result of compiling following code?

public class MyClass{

public static void main(String args[]){

System.out.println("In first main()");

}

public static void main(char args[]){

System.out.println('a');

}

}

A. Code will not compile and will give "Duplicate main() method declaration" error

B. Code will compile correctly but will give a runtime exception

C. Code will compile correctly and will print "In first main()" (without quotes) when it is run

D. Code will compile correctly and will print "a" (without quotes) when it is run

- 0of 0 votes
The value obtained in the function is given back to main by using ________ keyword?

A. return B. Static C. new D. Volatile

- 0of 0 votes
If two strings are identical Stringcmp() returns

A. -1 B. 1 C. 0 D. Yes

- 0of 0 votes
Give a binary tree, each node has an extra information, that is, how many children he has,

Find the kth node val in the inorder transversal ,

Followup how to insert a node, such that this newly added node become the Nth node of the inorder binary tree's traversal`class TreeNode{ int val; int NumberOfchildren; TreeNode left; TreeNode right; public TreeNode(int val){ this.val = val; } } public static int findKthOfInorder(TreeNode root, int k) {`

- 0of 0 votes
Give a weighted n-nary tree and find the longest path from the root node to the leaf node

class Node {

int id;

// connected node id, edge weight

Map <Integer, Integer> edges;

}

- 1of 1 vote
Google

1st round

Given a box with N balls in it, each ball having a weight, randomly choose pick one out base on the weight.

Input ball1-> 5kg, ball2 -> 10kg and ball3 -> 35kg,

then Prob(ball1 chosen) = 10%, Prob(ball2) = 20%,

Prob(ball3) = 70% ;

Follow-up:

Select a ball randomly based on weights. Once a ball is chosen, remove it. Next time select from the remaining balls. Go on until there is nothing left in the box.

- 0of 0 votes
Hotmail Customer Service in USA

- 0of 0 votes
You are given two numbers L and R, can you count how many number between L and R inclusive their first digit from left equal to one?

- 0of 0 votes
Given a binary matrix, count the number of square that can be formed by all 0s

- 0of 0 votes
given a string p, called order, such as abc, means a in front of b, and so on

given a second string s, to determine whether it is follow the order of p, return boolean,

example If aaa return true,

If cba is false

If aaxyc is true, the letters that have not been seen in the order are skipped

- 2of 2 votes
Find whether string S is periodic.

Periodic indicates S = nP.

e.g.

S = "ababab", then n = 3, and P = "ab"

S = "xxxxxx", then n = 1, and P = "x"

S = "aabbaaabba", then n = 2, and P = "aabba"

follow up:

Given string S, find out the P (repetitive pattern) of S.

- 1of 1 vote
Design a hit counter which counts the number of hits received in the past 5 minutes.

Each function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are being made to the system in chronological order (ie, the timestamp is monotonically increasing). You may assume that the earliest timestamp starts at 1.

Example:

HitCounter counter = new HitCounter();

// hit at timestamp 1.

counter.hit(1);

// hit at timestamp 2.

counter.hit(2);

// hit at timestamp 3.

counter.hit(3);

// get hits at timestamp 4, should return 3.

counter.getHits(4);

// hit at timestamp 300.

counter.hit(300);

// get hits at timestamp 300, should return 4.

counter.getHits(300);

// get hits at timestamp 301, should return 3.

counter.getHits(301);

Follow-up:

Due to latency, several hits arrive roughly at the same time and the order of timestamps is not guaranteed chronological.

Follow up 2:

What if the number of hits per second could be very large? Does your design scale?

- 0of 0 votes
Given a string as a datastream Iterator<Character>, find the length of the longest substring without repeating characters

public String longestUniqueChars(Iterator<Character> chars)

- 0of 0 votes
Giving start string and end string, determine if start string can finally reach to the same as end string with below rules.

For example:

"R L _ _ L R L"

"_": the space is empty

"L": this can only swap with the empty letter _ on its left side

"R": this can only swap with the empty letter _ on its right side

So, "R L _ _ L R L" can change to "R L _ L _ R L" , and can continue change to (if you want) "R L L _ _ R L". from: 1point3acres.com/bbs

The question is given these rules and the start string and end string, could we change the start string to end string (unlimited # moves as long as it is valid).

For example:

"R _ _ L R _ R _L"

can be changed to

"_ R L _ _ R R L _"

- 0of 0 votes
A Courier running firm want to automate the job of “service coverage area” based on the pin code of the AREA and it should display the message as mentioned below If service is available then display the statement: Service available for the locality: Area Name Otherwise display the statement: No Service available for the locality: Pincode Develop a Python program for the implementation of the above scenario?

- 0of 0 votes
Implement an Object oriented programming features like Class, Object, Constructor in Python to capture basic details of an Employee like Name, Salary etc. Develop a program to read and display the Employee details along with the total number of employees exists , currently? Hint: i. Make use of Class concept, Object creation and accessing objects using the member functions ii. Make use of constructor to initialize the employee details / employee object\ iii. Create get functions (one for each attribute / property) to display employee details and employee count.

- 0of 0 votes
A store provides the facility for customer and sales person/manager to view all the products in the alphabetical order of the Products. Which makes tracking easy. Develop a Python program to automate the above task?

- 0of 0 votes
A Gaming institute want to assign grade / score for each student based on the game results in Finals. So develop an application using Python which will automates to display the list of students, who falls into the below categories in Finals and which will helps the management to provide the scores accordingly? Categories: -Who is a loser at least in one game? -Who is a looser in all the games? Note: i. Consider that, same Associate might be the looser in more than one game ii. There are three games conducted: Chess, Caroms, Long jump ii. Develop a program in such a way that , it works on only on Finalists in each game Hint: i. Use the data structures: List / Dictionary along with the set data structure. ii. Maintain a separate list / dictionary for each game finalists and store couple of students in the list and use these lists for finding out the students, who falls into the above category mentioned in the problem statement For Ex: chessFinalList=['Hanu','Raja','RAMA'] caromsFinalList=['RAJA', 'RAMA','RAMANA'] longJumpFinalList=['RAJA','RAMA','RAVI']

- 0of 0 votes
If I need to read .txt file (inside +4000 words) and print 100 most repeated which structure is the easiest:

hash table?

binary tree?

linked list?

Thanks

- 0of 0 votes
Hi, my question is about linked list? If I read .txt file (there is 5000 words inside) in to linked list. Is it possible to print 100 mostly repeated words and print them ??

example:

cat cat dog dog dog

dog3

cat 2

Thank you in advance for any help you can provide.

- 1of 3 votes
Round3 Google

For N light bulbs , implement two methods

I. isOn(int i) - find if the ith bulb is on or off.

II. toggle(int i, int j) - i <= j. Switch state (switch on if it's off, turn off if it's on) of every bulb in range i to j.

All bulbs are off initially.

- 1of 3 votes
given a list of points in a rectangular coordinate system, seeking any two points, such that all the remaining points will be in only one side of the line.

- -1of 1 vote
Given a MxN matrix where each element can either be 0 or 1. We need to print the shortest path between a given source cell to a destination cell. The path can only be created out of a cell if its value is 1.

BFS is trival, please solve it use DFS

public void print(int[][] matrix, int[] start, int[] end){

}

- -1of 1 vote
Choose The Best [url=https://www.stonefirearms.com/Innovative-Arms-Slingshot-22LR-Titanium-p/ia-2102.htm]Silencer[/url]

For Your Guns

Shop online for gun Silencer at Stonefire Arms. With offering the reliable services, we are one of the leading companies of the industry. We are specialized for offering; AR-15, AR10 & SCAR, Shotgun, Handguns,Suppressors, Bolt Guns type rifles. We use and sell only top quality products. Our mission at Stonefire Arms is to provide the best shopping experience by offering quality products and world class customer service at affordable prices. Fast shipping & reliable customer services!