Code Monkey home page Code Monkey logo

psyc161-nbackseq's Introduction

psyc161-nbackseq

Description

A mini project to generate balanced sequences

A simple utility

> nbackseq n l w1 w2 w3 ...

and output comma-separated sequences of words from the provided set (w1, w2, ...) of length l so that for any entry there is no repetition of words n items back (n includes the item)

e.g.

> nbackseq 2 2 a b

a,b
b,a

> nbackseq 3 12 house face shoe

house,face,shoe,house,face,shoe,house,face,shoe,house,face,shoe
...

The goal will be to implement and test (unit-tests) two solutions for the problem. Initial one will be based on a simple permutation with selection of solutions which satisfy needed criterion. We will make sure that it works correctly, implement some timing of the execution and then go on to optimize it by adopting the eight queen puzzle solution, which was implemented via backtracking depth-first search.

TODOs

  • Yarik will initiate
    • new repository on github
    • README.md and nbackseq script prototype
    • basic tests
  • You will fork repository on github, and implement permutation-based solution, commit, and then submit a PR
  • Yarik meanwhile will be adding more tests and assessments, so you will need to merge new additions
  • You will implement the optimized solution

Extras

  • verify that all input words unique

psyc161-nbackseq's People

Contributors

yarikoptic avatar

Watchers

 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.