473,383 Members | 1,862 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,383 software developers and data experts.

c# algorithms / c# puzzles

Hi,

1) I want to hone my problem solving skills and be good at logic. How do I
achieve
this?
2) Where can I find c# puzzles or c# algorithms.

3) How do I print the values of a N X N matrix using c#.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

How do I print 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10.

Mar 29 '07 #1
2 5151
1) I want to hone my problem solving skills and be good at logic. How do I
achieve
this?
Get the book "Inntroduction to Algorithms" by Cormen... :-)
Will help you build the concepts around algorithms.
2) Where can I find c# puzzles or c# algorithms.
I don't think there's something like C# algorithms. Algorithms are
algorithms. Mostly mathematical... cannot and shouldn't be language
specific.
3) How do I print the values of a N X N matrix using c#.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
What's the problem in this?
How do I print 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10.
And in this one...? Where are you stuck?
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Mar 29 '07 #2
Presuming that you are studying programming, a desire to improve your
problem-solving skills and understand logic are excellent goals to have in
mind. Almost all of programming is problem-solving, and involves the use of
logic.

Problem-solving is more of a discipline than a skill, although there are
elements of skill involved in it. But the most important aspect is the
discipline, and this holds true for logic as well. The basis of
problem-solving is really fairly simple, but it requires a relentless
attention to detail to do it well.

The first aspect of problem-solving is to identify the problem, and while
this may seem obvious, it is not as obvious as it seems. Most problems are
not singular in nature; they are made up of many smaller problems. For
example, you might consider thirst to be a problem. But quenching the thirst
is likely to be problematic. First, you must identify a source of water, and
ensure that it is good to drink. Second, you must determine how to get to
the source of water. Third, you have to figure out how to drink it, whether
to cup your hands, use a glass, etc.

So, the first and perhaps most important aspect of problem-solving is
analysis. This is the breaking down of a problem into its component smaller
problems. Once each sub-problem has been identified, the solution to the
overall problem generally makes itself obvious, as it is the sum total of
all the solutions to the smaller problems that constitute the large one.

It is also useful to identify what constitutes a problem. Life is actually
full of problems, and it is helpful to learn to identify them and apply
problem-solving skills to them. Any need which is not yet fulfilled is a
problem to be solved.

In fact, it is not necessary to find C# algorithms or C# puzzles to develop
your problem-solving skills. Playing games can be helpful, as well as
solving various types of puzzles.

As for logic, there is a lot to be learned. Here are a couple of places to
start. Logic is useful in all sorts of situations, in fact, anything
involving reasoning:

http://www.philosophypages.com/lg/index.htm
http://plato.stanford.edu/entries/aristotle-logic/

As for your specific third question, there is no answer to it, because you
have not sufficiently identified the nature of the problem to solve it. What
do you mean by "print?" And what are the parameters for this so-called
"printing?" For example, you mentioned a "N X N matrix" and typed the
members of a matrix in a column/row arrangement. However, you did not
specify anything about how the members were to be organized, if at all.

To write an application that solves your matrix problem, you have to tell
the computer exactly what to do. This means that there is no room for
interpretation. When you say "print" you are being very non-specific. The
word actually has a few different definitions, several of which might be
applicable. Do you want to "print" these numbers on paper? Do you want to
"print" them in a Console application? Do you want to "print" them in a
windowed application? And again, you "printed" the matrix using columns and
rows, but your problem didn't mention anything about columns and rows. The
computer cannot and will not guess how to fill in the blanks in your
requirements.

But as I mentioned earlier, the first step to solving a problem is to
identify all of the aspects of it.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
Networking Components, Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"CrmNewbie" <Cr*******@discussions.microsoft.comwrote in message
news:B7**********************************@microsof t.com...
Hi,

1) I want to hone my problem solving skills and be good at logic. How do I
achieve
this?
2) Where can I find c# puzzles or c# algorithms.

3) How do I print the values of a N X N matrix using c#.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

How do I print 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10.

Mar 29 '07 #3

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

Similar topics

5
by: PM | last post by:
Hello!!!! I am com sci student.... I am really interested in C... Does anybody know any free ebooks or websites for puzzles that test the intricacies of C... Please Help.... Casanova
7
by: Anders Borum | last post by:
Hello! I'm starting to dive into algorithms in general (sorting, trees etc.) and am currently reading a book from Robert Sedgewick called "Algorithms in C++, 3rd. Edition" and would like other...
2
by: xPy | last post by:
do you know any links where i can find puzzles, like the 8 queens problem? (I'm not intrested in the solution, only for puzzle...)
11
by: John Salerno | last post by:
Similar to the Python Challenge, does anyone know of any other websites or books that have programming puzzles to solve? I found a book called "Puzzles for Hackers", but it seems like it might be a...
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...
3
by: arnuld | last post by:
i am looking for "algorithms in C++" book. Knuth is FULL of Mathematics, not my kind of author. i checked ACCU and got these (listing only those that are available in my country: 1. Algorithms...
53
by: Vicent Giner | last post by:
Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming...
25
by: Oltmans | last post by:
Hi guys, I'm learning JavaScript and I need some puzzles that can make me a better JavaScript programmer. I mean I'm looking out for programming puzzles (e.g. Project Euler or TopCoder) but I'm...
62
jkmyoung
by: jkmyoung | last post by:
Does anyone have some super, super hard Sudoku puzzles? Back in February this year, I had enough time to finally program a Sudoku solver in Java. Right now, I'm looking for solvable puzzles, but...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.