Permutation Generator Coding Interview Question

Episode 04 of the series is available now on my YouTube channel.

This problem revolves around generating permutations of a sequence incrementally. Rather than pouring out a huge vector of output, this problem asks for a generator that can output the next permutation of a vector with every iteration.

For this video, I code in C++ and uses a functor to create the generator.

https://gist.github.com/jacksongabbard/ef538630dea7e01dfffccdf97ed28eda.js

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s