Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
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 ...
RainningTW's user avatar
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 ...
Beny Benz's user avatar
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 ...
Himanshu Ray's user avatar
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 ...
syb0rg's user avatar
  • 21.9k