473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Looking for practice programming problems

Hi,

I am looking for C# practice/interview programming problems and NOT
general framework explanatory questions.

The ones I've come across I find a wee bit easy. I'd like to find
material that tests not just technicality or knowledge of the language
but also one's problem solving abilities, though not the kind that takes
a day to implement a piece. I'd be grateful to ya'll for any
recommendations on books/link/resources that you might suggest.

Antoan
Jun 12 '06 #1
12 17278
A few of the ones I like to use ...

1) Given an integer print out a string of 32 1's and 0's representing its
bits //very easy if you know bitwise oeprators or have a good framework
grasp, shouldn't take more than 1-2 minutes
2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze
4) Give them bad/buggy code and make them philosophically debug it then
refactor it to be better code

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"antoan" <an****@antoan.plus.com> wrote in message
news:44**********************@ptn-nntp-reader01.plus.net...
Hi,

I am looking for C# practice/interview programming problems and NOT
general framework explanatory questions.

The ones I've come across I find a wee bit easy. I'd like to find material
that tests not just technicality or knowledge of the language but also
one's problem solving abilities, though not the kind that takes a day to
implement a piece. I'd be grateful to ya'll for any recommendations on
books/link/resources that you might suggest.

Antoan

Jun 12 '06 #2
> 2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze


I'd walk out of the interview if I saw questions like that :-)
Jun 12 '06 #3
I personally ask them how they would do it theoretically (and I should add
thats a question for a lower level developer :)) not to actually do it.. I
never have them write code in an interview ..

Actually I should add another I ask alot for winforms people .. how would I
may a textbox print its text upside down.

I prefer in general to ask odd questions I know they have never had to do
but are simple if you understand whats going on.

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"Peter Morris [Droopy eyes software]" <pe**@droopyeyes.no.com.spam> wrote in
message news:ei**************@TK2MSFTNGP04.phx.gbl...
2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze


I'd walk out of the interview if I saw questions like that :-)

Jun 12 '06 #4
> Actually I should add another I ask alot for winforms people .. how would
I may a textbox print its text upside down.


I'd turn the monitor upside down and prove that the text is, in fact, upside
down inside the textbox (which is also upside down) :P

Mythran

Jun 12 '06 #5
"Peter Morris [Droopy eyes software]" <pe**@droopyeyes.no.com.spam> wrote in
message news:ei**************@TK2MSFTNGP04.phx.gbl...
2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze


I'd walk out of the interview if I saw questions like that :-)


Me too.

///ark
Jun 12 '06 #6

2) Write some basic code that generates mazes ... make them write
code to
solve a maze
3) Make them write code to find the optimum solution to a given maze

I'd walk out of the interview if I saw questions like that :-)


I'd stick around and flunk it :)

--
Saad Rehmani / Prodika / Dallas / TX / USA
Jun 12 '06 #7
Mythran wrote:
Actually I should add another I ask alot for winforms people .. how
would I may a textbox print its text upside down.


I'd turn the monitor upside down and prove that the text is, in fact,
upside down inside the textbox (which is also upside down) :P

Mythran

In this case it might be actually easier to implement an 'Alan Turing
test' self consciousness AI solution to simply visually look at it and
say weather the text box is really upside down without resourting to
neural networks pattern recognition : )

No, but really,

"I prefer in general to ask odd questions I know they have never had to
do but are simple if you understand whats going on."

as Greg mentions is the kind of stuff I'm looking for.
P.S Asking them to philosophically debug code, Greg? I find that beyond
hilarious : ) Can almost hear them saying: " U want me debug this method
my self? Define self!!" : )

Cheers,

Antoan
Jun 12 '06 #8
Peter Morris [Droopy eyes software] wrote:
2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze


I'd walk out of the interview if I saw questions like that :-)

No, just ask for a beer instead of another coffee and then walk out : )
Jun 12 '06 #9

Greg Young wrote:
I personally ask them how they would do it theoretically (and I should
add thats a question for a lower level developer :)) not to actually
do it.. I never have them write code in an interview ..

You might want to check out http://blogs.msdn.com/ironarchitect/...01/586219.aspx
for those pesky abstract level developers :)
<snip>

Jun 12 '06 #10
"Peter Morris [Droopy eyes software]" <pe**@droopyeyes.no.com.spam>
wrote:
2) Write some basic code that generates mazes ... make them write code to
solve a maze
3) Make them write code to find the optimum solution to a given maze


I'd walk out of the interview if I saw questions like that :-)


Those are not difficult questions - relatively easy with a little
recursion, and they're the typical questions you'd see in a programming
contest. However, these two together would take an hour or so to write
and debug (probably longer if one had to read and write the mazes /
solutions to a particular data format), preferably in private and on a
computer with one's preferred setup available.

Talking through them, I don't think that's unreasonable. But it's still
basically a test of knowing when and how to apply recursion, and not
really a test of code reasoning.

I would prefer a coding sample that was actually simpler, but admitted
several approaches, each with varying tradeoffs. One could then discuss
the tradeoffs, and the varying approaches, starting from a high level,
and working down to a lower level, and considering each possibility with
its tradeoffs. In these cases, the simpler the problem the better,
because it takes less time to explain, but that are open-ended,
admitting more creativity.

An odd thing about (and IMHO one of the bigger problems with) the maze
problems above is that correct solutions are almost guaranteed to have a
certain algorithmic complexity (linear in the maze area assuming a
classical "children's pen & paper maze" fitted on a grid inside a
rectangle, for both problems).

-- Barry

--
http://barrkel.blogspot.com/
Jun 12 '06 #11
Perhaps you should look at your dilemma as a problem and solve it. After
all, you do want your students to do the same, do you not? Taken abstractly,
any task one is charged with, for which the methodology is not provided, can
be seen as and accomplished by seeing it as a problem to be solved. The same
problem-solving principles are applied, whether the task is one of writing
software, or, for example, teaching others how to write software. The
requirements are identified. The environmental conditions are analyzed.
Several different pathways to achieve the requirements are proposed. Each
pathway is critically analyzed and compared qualitatively with other
alternatives. The best possible pathway is decided upon, and executed.

Of course, your advice-seeking is a valid and useful aspect of the
analytical part of the problem-solving process, and I commend you for it.
This is merely my contribution to the thought pool. :)

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.

"antoan" <an****@antoan.plus.com> wrote in message
news:44**********************@ptn-nntp-reader01.plus.net...
Hi,

I am looking for C# practice/interview programming problems and NOT
general framework explanatory questions.

The ones I've come across I find a wee bit easy. I'd like to find material
that tests not just technicality or knowledge of the language but also
one's problem solving abilities, though not the kind that takes a day to
implement a piece. I'd be grateful to ya'll for any recommendations on
books/link/resources that you might suggest.

Antoan

Jun 13 '06 #12
Kevin Spencer wrote:
Perhaps you should look at your dilemma as a problem and solve it. After
all, you do want your students to do the same, do you not? Taken abstractly,
any task one is charged with, for which the methodology is not provided, can
be seen as and accomplished by seeing it as a problem to be solved. The same
problem-solving principles are applied, whether the task is one of writing
software, or, for example, teaching others how to write software. The
requirements are identified. The environmental conditions are analyzed.
Several different pathways to achieve the requirements are proposed. Each
pathway is critically analyzed and compared qualitatively with other
alternatives. The best possible pathway is decided upon, and executed.

Of course, your advice-seeking is a valid and useful aspect of the
analytical part of the problem-solving process, and I commend you for it.
This is merely my contribution to the thought pool. :)

Kevin, I appreciate the thought,

however I am the student, the problems are for my self to practice with.

Antoan
Jun 15 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Joe Cheng | last post by:
I'm curious about something... many Artima.com members who have a Java background and learned Python have come to the conclusion that Java and Python are highly complimentary languages. They would...
42
by: Kevin Spencer | last post by:
Is it just me, or am I really observing a trend away from analysis and probem-solving amongst programmers? Let me be more specific: It seems that every day, in greater numbers, people are coming...
0
by: mikeybe | last post by:
I need to know it this is possible: At my job we take aerial digital photographs. Our rigs have swappy cages with 2 laptop hard drives in them (not standard-designed for only 1). We have a...
3
by: Ray | last post by:
OK, maybe I shoot a more general question to the group since there are so many great programmers here: how do you practice your craft? I do it in the following way: 1. Set aside 30 minutes to...
26
by: vlsidesign | last post by:
I am a newbie and going through "The C programming language" by Kernighan & Richie on my own time (I'm not a programmer but I want to learn because it can save me time in my normal job, and it is...
0
by: cazconv2007 | last post by:
Heres my code , this is a homework i dont understand why it doesnt like my driver (tutor provided driver , not meant to change it), error says unreported exception java.lang.exception must be caught...
13
by: btkuhn | last post by:
Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.