473,671 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Doing OK with Java Prog But Need Help With Algorithms

66 New Member
Hi Everyone,

Could you share your experience on how to get better at solving problems. I am doing okay with the programming part, but I do not always pick the best algorithms for my problems. Do you have suggestions on how to get better at this? Where did some of you get so good at solving various problems?? Please help me out here. Thanks in advance -
Oct 27 '07 #1
5 1153
Ganon11
3,652 Recognized Expert Specialist
Problem solving is one of the few things that I never 'learned', I just had it. Regardless, I still sometimes think of poor algorithms. That's why I'm taking the Data Structures and Algorithms class I'm in.

What level of programming are you doing? Are you a high school student? University student? Interested non-student? I suggest you pick up a book on algorithm analysis - the one I have, Data Structures and Algorithm Analysis in C++, is very good and comprehensive. There is a version for Java here. Looks a little expensive, but it's amazing for teaching relative faster/slower algorithms, and how you can tell which of 2 algorithms is faster.
Oct 27 '07 #2
JosAH
11,448 Recognized Expert MVP
Hi Everyone,

Could you share your experience on how to get better at solving problems. I am doing okay with the programming part, but I do not always pick the best algorithms for my problems. Do you have suggestions on how to get better at this? Where did some of you get so good at solving various problems?? Please help me out here. Thanks in advance -
The canonical book on this very topic is Donald Knuth's three volumes:
"The Art of Computer Programming". Those volumes are a must read; every
thinkable algorithm is explained and proofs are given for their big-Oh behaviour.
Maybe you can lay your hands on a second hand version of those volumes.

kind regards,

Jos
Oct 27 '07 #3
CodeTilYaDrop
66 New Member
I am just learning to program this year. I finally got a class that teaches you somethiing this year, and I am learning at an astronomical rate!!! I really appreciate you both answering my questions in the past and now! You have been a great help to me!!

I will probably take Gannon's advice and pick up the book at my school library. They have all the latest and greatest books out there. It is one of the better libraries I have seen. I doubt the books Jos mentioned are there though, but they might.

I might buy the ones Jos mentioned later on because they look like the true meat on this subject. I am a little too basic at this point to be able to absorb the material in those books now and I might be for Gannon's book, too. Gannon's book is the easier of the two though, and I do need to learn it!!

Also, I might learn some more in the next class on this. I have to take one where the book is called Data Abstractions & Problem Solving in C++(next semester).

Thanks again you two!!! -
Oct 27 '07 #4
JosAH
11,448 Recognized Expert MVP
I might buy the ones Jos mentioned later on because they look like the true meat on this subject. I am a little too basic at this point to be able to absorb the material in those books now and I might be for Gannon's book, too. Gannon's book is the easier of the two though, and I do need to learn it!!
Of course there are lots of other good books around that are very well worth reading,
but, as you already mentioned yourself, a lot of them take a language specific
approach: "yadda-yadda-yadda in C++/Java/C#/whatever". Donald Knuth takes
the language neutral mathematical approach and actually gives your proofs for
the optimality for a huge bunch of algorithms; but maybe you're right and you
should keep it in mind for later so you can enjoy the real "meat" a bit more ;-)

kind regards,

Jos

ps. another really good one is "Design and analysis of Algorithms" by Aho,
Hopcroft and Ullman. It's a second must read for your list. It's all about algorithms,
no language specific stuff in there.
Oct 27 '07 #5
CodeTilYaDrop
66 New Member
Jos, I am writting all these books down to get in the near future! I appreciate you all for you help. Thanks again buddy-
Oct 28 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

54
17394
by: Spammay Blockay | last post by:
I've been tasked with doing technical interviews at my company, and I have generally ask a range of OO, Java, and "good programming technique" concepts. However, one of my favorite exercises I give interviewees seems to trip them up all the time, and I wonder if I'm being too much of a hardass... it seems easy enough to ME, but these guys, when I get them up to the whiteboard, seem to get really confused. The exercise is this:
11
9246
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
133
8534
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
17
4336
by: Allerdyce.John | last post by:
Hi, I am trying to compare the amount of work between using STL algorithm VS a plain Java loop. Let's say the class Rect has 2 attributes: area, and areaPerCent. In Java, I just write a plain for loop with a list: public static void calculateAreaPerCent(List rectList, float containerArea) {
1
1405
by: Paul | last post by:
Hi, I want to store particular algorithms written in Java into a database (preferably MySQL) and then be able to accept values such as algorithm type and parameters from a user (via JDBC) which will select the algorithm from the database, excecute it and return the result. I understand that MySQL does not support Java object types, so does anybody have any suggestions on how I could implement this? Will I need to compile the code and...
2
6949
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
0
2048
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i don't know how to return the rows the cursor has opened and I don't know how to handle the return set from the proc in my java code. My main problem with that proc is that whether I can retun the result set from the proc without closing the cursor...
0
8472
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8909
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8596
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.