## Forum Posts

- 0 Answers
**What languages can you write code in the online coding round of Facebook?**Hey there,

- peanuts October 03, 2014

I'm a new grad looking to apply to Facebook for a software engineering job.

The first round is an online coding round on InterviewStreet/HackerRank.

What languages are we allowed to code in?

What about the interviews? What languages are we allowed to code in?| Flag | PURGE - 2 Answers
**Given a circular linked list, implement an algorithm which returns the node at the beginning of the loop.**why FastRunner is LOOP_SIZE - K steps behind SlowRunner ?

- inadram September 30, 2014

why if we assign head to the slow runner ,then after k step head and fast runner meet each other at the beginning of the loop?| Flag | PURGE - 5 Answers
**interview question**How to split into word "This a pen" without using split method.

- ideaspleasant September 24, 2014| Flag | PURGE - 1 Answer
**Algorithms**Given an input n, find the smallest number x such that x % n = 0 and sum of the digits in x is equal to n.

- mohit September 22, 2014

Note: x is so large even long long int can't keep it.

It is obvious that find the sum of digits using (x/10) gives timeout, so how can its complexity be reduced.| Flag | PURGE - 0 Answers
**Find minimum number of towers which cover maximum number of houses**Consider a long straight road from left to right with houses scattered along the road (you can think

- empp September 21, 2014

of houses as points on the road). You would like place cell phone towers at some points on the road so

that each house is within 4 kilometers of at least one of these towers. Describe an efficient algorithmwhich achieves this goal and uses as few cell phone towers as possible.

Hint: Consider a solution where each tower is located as much to its right as possible (without

changing the number of towers). How would you construct such a solution ?| Flag | PURGE - 2 Answers
**Order of code**public static void main(String[] args) {

- bjain September 20, 2014

int i, j, k, count, n;

n = 100; count = 0;

for (i = 0; i < n; i++){

for (j = 0; j < i; j++){

for (k = 0; k < j; k++){

count = count + 1;

} } }

System.out.println("count " + count); }

What will be the order of execution of the above code?| Flag | PURGE - 8 Answers
**I have 2 job offers in hand ADOBE and SAP Labs ? Which one to go with... ?**Both are in same location (Bangalore) & same job profile

- Priya September 11, 2014

Package is almost same (Adobe pays 50k more per yr).

Which would be the better company to join?

For a 2+ years Experience Candidate in IT industry....

Please do mention the reason for the company you would suggest.

Thanks in Advance :)| Flag | PURGE - 1 Answer
**Java front end developer interview questions**hello all, thanks in advance.

- j.laxmiprasanna September 11, 2014

Iam new to software industryhere in US, i am going to have my interview next week, feeling so nervous.

So could some please share their interview experiance and also type of questions i could expeect at my interview.

I am going to have interview for Java front end developer| Flag | PURGE - 1 Answer
**BitWise Operator**Hi All,

- sunil.vurity September 07, 2014

I have a question

A country has 25 states ( can vary) and based on population of each state give a color to that state.

for e.g

state1 population is 5000

state2 population is 10000

state3 population is 12000 and so on....

now im also given colors to assign based on population

population==5000 assign green

5000<population<10000 - blue

population==10000 assign orange

10000<population<15000 - yellow and so on up to 100,000 ( this is the max limit of population for a state )

I can give a solution where

Step 1: create a dictionary/hashtable to maintain colors based on population.

Step 2 : Read each country population ( iterate thru countries ) and lookup in hashtable and assign.

the above solution is bruteforce.

I was given a hint to use bitwise operator for this . Any thoughts how I can go about it ?

Thanks,| Flag | PURGE - 0 Answers
**data structure**this is c program to check balanced paranthesis using stack,

- rkc1.NITD September 05, 2014

i dnt know whats wrong it always showing balanced expression.

tell me what i am doing wrong.??#include<stdio.h>

void main()

{

char stk[50],exp[100];

int top=-1,i;

printf("enter an expression\n");

gets(exp);

for(i=0;exp[i]!='\0';i++)

{

if(exp[i]=='('|| exp[i]=='['||exp[i]=='{')

{

top++;

stk[top]=exp[i];

}

else

if(exp[i]=')')

{

if(stk[top]=='(')

top--;

}

else

{

printf("unbalanced exp\n");

break;

}

if(exp[i]=']')

{

if(stk[top]=='[')

top--;

}

else

{

printf("unbalanced exp\n");

break;

}

if(exp[i]='}')

{

if(stk[top]=='{')

top--;

}

else

{

printf("unbalanced exp\n");

break;

}

}

if(top==-1)

printf("exp is balanced\n");

else

printf("exp is not balanced\n");

}| Flag | PURGE

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

Open Chat in New Window