Skip to content

Instantly share code, notes, and snippets.

View bruceoutdoors's full-sized avatar
🧗

Lee Zhen Yong bruceoutdoors

🧗
View GitHub Profile
@bruceoutdoors
bruceoutdoors / HeapPermute.cpp
Last active August 29, 2015 14:10 — forked from ishikawa/HeapPermute.java
Heap's algorithm is an algorithm used for generating all possible permutations of some given length.
#include <iostream>
using namespace std;
const int SIZE = 4;
void printArray(int arr[], int size)
{
for ( int i = 0; i < size; i++ )
cout << arr[i] << ' ';