All Questions
4 questions
1
vote
2
answers
376
views
Next different permutation in C
This is a program which you can get the next "different", i.e. elements in A[] can be identical, permutation at each call. I've written a C++ program for ...
4
votes
2
answers
159
views
Counting the maximum number of four-in-a-row wins
It all started during a "fourInARow" game...
A friend of mine asked: "If you drop in all 42 stones, what will the number of "four in a row"s be with the optimal configuration?"
I thought it should be ...
1
vote
1
answer
179
views
Find all combinations of a number sequence which is first increasing then decreasing
Given an integer N(Natural Number), A program/Algorithm to find the
remainder of arrangements that can be obtained by rearranging the
numbers 1, 2, ...., N.
Input Format: One line containing ...
33
votes
6
answers
68k
views
Brute Force Algorithm in C
This is a simple brute force algorithm that I have programmed in C. All the program does is print out every possible combination of the given alphabet for the ...