• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Interview questions puzzles

 
Ranch Hand
Posts: 817
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Today I went for  Interview and following question asked and I gave my best bet, please correct me if I am wrong

1.  What is the next number in series ::  00122436485
my best bet ::  1

2.  There are 25 house,  10 house have less than 6 room,   10 house has more than 7 room, 4 house has more than 8 room  how many house have either 6 or 7 or 8 room.
my best bet  :: 11

3.   There are four people namely, A, B, C, D  , which needs to cross bridge ,  only 2 poeple can cross at once in night,  there is only one night lamp, one person need to carry lamp
following is the time taken by each
A : 10 mins
B: 5 mins
c : 2 mins
D : 1 min

first D will cross along with A, then go back and cross with B, and then with C will totally take 19 mins

Question :   how they will take 17 mins ,  please tell the process ,  it was written that 17 min is valid option.


4. Write puesdocode  to  reverse the string but not letter :   like  'his voice is loud"     should be   "loud is voice his"

5.write pudeocode  to write all permutation combination of N letter  like "abc"  has 6 different combination write generic program



Thanks
Amit

 
lowercase baba
Posts: 13014
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#3 isn't hard...

C&D cross - 2 minutes
D returns- 1 minute
A&B cross - 10 minutes
C returns - 2 minutes
C&D cross - 2 minutes

17 minutes total.
 
Bartender
Posts: 2899
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
00122436485 can be broken down as 2 series interleaved:



Next number in my opinion should be 10 or next digit should be 1
 
salvin francis
Bartender
Posts: 2899
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No 4, If I understand correctly is to simply take a sentence, parse it and print the "words" in the reverse order.
I would suggest splitting it using space as a delimiter and storing it in a List. You could easily reverse this list using Collections.reverse(list); and then print it back.
reply
    Bookmark Topic Watch Topic
  • New Topic