• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

permutation program  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody guide me how to write a permutation program in java.

i have to display "DELL DESKTOP COMPUTERS" as in the format of below,

�Dell�
�Desktop�
�Computers�
�Dell Desktop�
�Dell Computers�
�Desktop Dell�
�Desktop Computers�
�Computers Dell�
�Computers Desktop�
�Dell Desktop Computers�
�Dell Computers Desktop�
�Desktop Dell Computers�
�Desktop Computers Dell�
�Computers Dell Desktop�
�Computers Desktop Dell�



thanks in advance
 
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well!!!
i am not sure with it since i have never tried such,but
What i can say is,you try using for loops and since these are Strings,so take an array of string,in which you store your values,at 0,1,2 index positions,later in your for loop you can use,string class concat method with a space in it........and try to display it....

i dont know if this helps you to atleast some extent......
 
vijay Krishnan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thanks for your information. but i had tried it using that but i can not achieve the result

i need a whole program for this problem.

thanks in advance.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, what have you tried? Show us your effort so far, and we'll try to help you get going.

Posting complete code that solves the problem will not help you learn, so that's being frowned upon here.
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a homework question that has been posted before in this thread.

Like in that thread, I say DoYourOwnHomework. If you give it a go, and have some specific problems, please post the code you have so far. Then someone will help, I'm sure.

Also, this is a Beginner question, not Advanced.
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recursion was one of the hints in the other thread. Are you comfortable with recursion at all? Maybe we can provide some examples that solve other problems and see if you can apply it to your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!