![]() |
How to get all possible combinations?
I want to try something different with php, and by this I want to apply it to a word problem.
How would I go about getting the possible combinations of 1,2,3,4,5 in possible orders, here are some possible orders, and examples of wrong orders. 2,3,4,5,1 = right 5,4,3,2,1 = right 1,3,2,5,4 = wrong 4,5,6,1,2 = right It has to follow in sequence. How would i go about getting php to output all possible combinations in that way, or if not all possible combinations in total without the right or wrong? I know for a fact there are some 120 possible combinations, of which only 70 some are able to follow in sequence. Thanks for your help, I want to test this to get me ready for programing in college. |
*bump*
after few days :pirate: |
try php.net because i can't think of anything that'd do this OR if your in school, go to your math teacher and ask them if there's a way to do this then do that in php
|
Its for college TEE Web Programming :p
|
Writing something now.
|
1 Attachment(s)
Enjoy my numerous cheap hacks and crazy boolean mixes:
|
Hey thats cool,
Quote:
|
I don't know. Right now all it does is verify existing combinations.
|
You have too much time on your hands filburt. That is one nice script :)
- miSt |
Before I noticed that it had to check forwards and backwards, I had it actually highlighting the point in the sequence where it went wrong. :)
|
All times are GMT. The time now is 07:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|