Programming Interview Questions

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

43 Replies - 16783 Views - Last Post: 29 May 2008 - 09:05 PM

#1 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1876
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Programming Interview Questions

Post icon  Posted 10 April 2008 - 09:23 AM

In line with Psycho's thread, we are also doing interviews at work right now.

We've been asking this question, but need to mix it up a little.

Quote

On the white board, write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".


Give me some alternatives to this. It's an entry level position, so we're looking for problems that demonstrate a grasp of programming logic, not a specific language.

Another we have, but haven't used as we feel it's to easy:

Quote

On the white board, write a program that outputs the "99 Bottles of Beer" song


Alright, I've got an interview today at 4 o'clock, give me some good questions to hit her with.

Is This A Good Question/Topic? 0
  • +

Replies To: Programming Interview Questions

#2 Nova Dragoon  Icon User is offline

  • The Innocent Shall Suffer, Big Time
  • member icon

Reputation: 36
  • View blog
  • Posts: 6,169
  • Joined: 16-August 01

Re: Programming Interview Questions

Posted 10 April 2008 - 09:39 AM

My favorite of late:
What's the difference between a well formed XML document and a valid one?
Was This Post Helpful? 0
  • +
  • -

#3 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4503
  • View blog
  • Posts: 28,411
  • Joined: 21-March 01

Re: Programming Interview Questions

Posted 10 April 2008 - 09:44 AM

View PostNova Dragoon, on 10 Apr, 2008 - 10:39 AM, said:

My favorite of late:
What's the difference between a well formed XML document and a valid one?

i LOVE this question.
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Programming Interview Questions

Posted 10 April 2008 - 10:00 AM

I'd be fried Chris...can't answer either of your questions;)
Was This Post Helpful? 0
  • +
  • -

#5 Nova Dragoon  Icon User is offline

  • The Innocent Shall Suffer, Big Time
  • member icon

Reputation: 36
  • View blog
  • Posts: 6,169
  • Joined: 16-August 01

Re: Programming Interview Questions

Posted 10 April 2008 - 10:14 AM

I heard that 80% of those interviewed with fizz buzz can't do it.
Was This Post Helpful? 0
  • +
  • -

#6 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4503
  • View blog
  • Posts: 28,411
  • Joined: 21-March 01

Re: Programming Interview Questions

Posted 10 April 2008 - 10:15 AM

we interviewed a guy (who's resume made him appear pretty accomplished) on tuesday who couldn't do it.
Was This Post Helpful? 0
  • +
  • -

#7 skaoth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 601
  • Joined: 07-November 07

Re: Programming Interview Questions

Posted 10 April 2008 - 11:01 AM

I like this one

http://www.dreaminco...wtopic43479.htm

I'll probably use it as a warm up question next time I get
a chance to interview
Was This Post Helpful? 0
  • +
  • -

#8 corliss  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 189
  • Joined: 25-October 06

Re: Programming Interview Questions

Posted 10 April 2008 - 11:27 AM

What is the job and the code they will make.
like:Application developer, JAVA.


P.s.
I would like to do fizzbuzz with a complier. I always failed the tests where I had to write out the app. I could flow chart it though.
Was This Post Helpful? 0
  • +
  • -

#9 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 729
  • View blog
  • Posts: 8,642
  • Joined: 14-September 07

Re: Programming Interview Questions

Posted 10 April 2008 - 11:33 AM

I'd fail miserably, I need the comfort of a PC.
Was This Post Helpful? 0
  • +
  • -

#10 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4503
  • View blog
  • Posts: 28,411
  • Joined: 21-March 01

Re: Programming Interview Questions

Posted 10 April 2008 - 11:49 AM

View Postcorliss, on 10 Apr, 2008 - 12:27 PM, said:

What is the job and the code they will make.
like:Application developer, JAVA.

Systems Analyst Level 1. Coldfusion, SQL, AJAX
Was This Post Helpful? 0
  • +
  • -

#11 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4354
  • View blog
  • Posts: 12,160
  • Joined: 18-April 07

Re: Programming Interview Questions

Posted 10 April 2008 - 11:53 AM

Well if she is hot you could always ask her for her number and give it to sloth. I am sure he would appreciate it.

As for questions that won't get you in trouble, you could ask her how she would go about finding the answer to a question she doesn't know. Often times I find the best programmers can hands down tell you where they would go and what resources they would use to solve the problem. Check out the resources she gives you for quality.

Her answer would tell you a lot about how she works. :)
Was This Post Helpful? 0
  • +
  • -

#12 corliss  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 189
  • Joined: 25-October 06

Re: Programming Interview Questions

Posted 10 April 2008 - 12:00 PM

I was asked this one.
Like what is it doing and what would you change.
*without using a complier*
I feel this applys to the SQL protion of the test.
CREATE FUNCTION dbo.Mystery(@Pattern nvarchar(5),
@Text	nvarchar(4000))

RETURNS nvarchar(4000)

BEGIN

Declare @Len int
Set @Len = Len(@Text) - CharIndex(@Pattern, Reverse(@Text))			Return SubString(@Text, 1, @Len)

END


Was This Post Helpful? 0
  • +
  • -

#13 Nova Dragoon  Icon User is offline

  • The Innocent Shall Suffer, Big Time
  • member icon

Reputation: 36
  • View blog
  • Posts: 6,169
  • Joined: 16-August 01

Re: Programming Interview Questions

Posted 10 April 2008 - 12:30 PM

Here is one, not exactly your domain.

You have a code to do element wise matrix multiplication.
int array1[10000][10000];
int array2[10000][10000];
int array3[10000][10000];
populate_array(array1);
populate_array(array2);

//Element-Element Matrix Multiplication
int i,j=0;
for ( i=0; i<10000; i++){
   for ( j=0; j<10000; j++){
	  arrray3[j][i] = array1[j][i] x array2[j][i];
   }
}




What is the main reason this code running so slow?
Was This Post Helpful? 0
  • +
  • -

#14 Mikhail  Icon User is offline

  • Bastard Operator From Hell
  • member icon

Reputation: 58
  • View blog
  • Posts: 1,378
  • Joined: 26-October 07

Re: Programming Interview Questions

Posted 10 April 2008 - 04:11 PM

   if (theNumber is divisible by 3) then
	  print "Fizz"
   else if (theNumber is divisible by 5) then
	  print "Buzz"
   else /* theNumber is not divisible by 3 or 5 */
	  print theNumber
   end if


*Whistles Innocently*
Was This Post Helpful? 0
  • +
  • -

#15 mattman059  Icon User is offline

  • Epic Awesomeness
  • member icon

Reputation: 15
  • View blog
  • Posts: 538
  • Joined: 23-October 06

Re: Programming Interview Questions

Posted 10 April 2008 - 04:14 PM

We were always told in CS courses that the typical CO-OP interview question would be like this:

"Print out the elements of a linked list in forward and reverse order"

As well as:

"Implement the Merge Sort"


I kinda always gave them this look :blink: :crazy: :v:
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3