Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 1
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2009, 02:37 PM
Masker n Reveller Masker n Reveller is offline
Junior Member
 
Join Date: Jun 2009
Posts: 1
Default

I want an algorithm to do this program in java language.?


I want an algorithm to do this program in java language.?

this is the last question of my assignment of 75 long programs, which i had to write in 2 days. 74 are done without anyone's help. but this is the most difficult of all (at least for a 15yr 10th grade school student).

program for printing all the possible combinations of a word.
this is what i've thought so far...

Input a string
store its length in a var 'n'.
Fix the positions of individual words in the string.(what my teacher said).
and then make combinations.
Now the problem is -------
lets say i fix the first word.
now, we can say that we need to consider a new string, which does not have the word which we have fixed.
But if i initiate a loop from 0 to length-1 for fixing the letters, then for that i will have to make several loops, which will depend on the length.
THe no. of loops in a program is fixed, it isnt variable.
so whats the solution to the problem ???

btw i m an amateur in programming, and i have a keen interest. i hav spent 5 days in this program . today is the sixth. so please dont tell me to spent my whole life thinking how to do this, cause i also have to do other homeworks and learning.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
write an algorithm,flowchart & c language program for getting a variable maira Software Design & Algorithms 0 01-24-2009 05:22 PM
What software do I need to program with Java? I know the language....? Micheli C Java, Java Servlets & JSP 0 09-06-2008 07:48 PM
i m keen to know that is Java Language is open source programming language or not? faizur Java, Java Servlets & JSP 0 08-21-2008 01:24 AM
Is there any FREE program out there that teaches me scripting language or java Eazy-E Java, Java Servlets & JSP 1 07-18-2008 03:15 PM
anyone can help me to do program on java...where it uses the Euclidean Algorithm..? ron albert t Java, Java Servlets & JSP 1 06-17-2008 01:22 AM

Your Ad Here

All times are GMT. The time now is 11:50 AM.