Git Product home page Git Product logo

string-permutations-seattle-web-120919's Introduction

String Permutations

Problem

Given a string made up of unique characters, create a function findAllPermutations() that finds and returns all permutations of that string as a single array.

For example:

findAllPermutations('abc')
//['abc', 'bca', 'cab', 'acb', 'bac', 'cba']

The order of the elements in the returned array does not matter. For example, findAllPermutations('abc') can return the array ['abc', 'bca', 'cab', 'acb', 'bac', 'cba'] or ['abc', 'acb', 'bca', 'bac', 'cab', 'cba'].

For this problem, you can assume the given string does not have duplicate characters.

Process

Mainly, this is your chance to shine. This problem is hard, but one of the nice things about it is that it has many different solutions.

Use it as a mechanism to focus on process, and work with a partner, if you can. Think about this problem as a practice in breaking down problems, and knowing when to retreat from a potential solution. Remember from the last lesson to try to derive what was good and what did not work in your previous attempt, before moving onto a new attempt.

A couple small hints to get started: where are some examples where the solution becomes obvious. What can you learn from it. Ok that's enough.

Be self-aware about when your process. When is your process good, and when it is less sucessful? We are trying to be disciplined about developing good habits as much as anything else.

string-permutations-seattle-web-120919's People

Contributors

annjohn avatar pletcher avatar jeffkatzy avatar victhevenot avatar maxwellbenton avatar bhollan avatar 7kingdavid7 avatar jasonpaulso avatar alpha-convert avatar smulligan85 avatar jakebrady5 avatar jeffpwang avatar jonbf avatar tejbans avatar thuyanduong-flatiron avatar

Watchers

Mohawk Greene avatar  avatar Bernard Mordan avatar Otha avatar raza jafri avatar  avatar Joe Cardarelli avatar The Learn Team avatar  avatar Ben Oren avatar Matt avatar Antoin avatar Alex Griffith avatar  avatar Amanda D'Avria avatar  avatar Ahmed avatar Nicole Kroese  avatar Dominique De León avatar  avatar Lisa Jiang avatar Vicki Aubin avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.