aspose file tools*
The moose likes Beginning Java and the fly likes Can there be any simpler logic or more faster way Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can there be any simpler logic or more faster way" Watch "Can there be any simpler logic or more faster way" New topic
Author

Can there be any simpler logic or more faster way

vanlalhmangaiha khiangte
Ranch Hand

Joined: Sep 11, 2006
Posts: 170
Hi guys,

I create some program where i want to display all the combinations of String a,b,c,d.This strings can contain N number of items.



Pseudo Code:-
for i in 0 to a.length
for j in 0 to b.length
for k in 0 to c.length
for l in 0 to d.length
call input(a[i],b[j],c[k],d[l]);

Can there be any easier way to do this?
Is there any faster way than this?

Thanks in advance,
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
that's as fast as it can go,

and you'll want 0 to length-1 on each of those,


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can there be any simpler logic or more faster way