exercism-perl5

Repository for my Perl 5 Exercism exercises
git clone git://git.samirparikh.com/exercism-perl5
Log | Files | Refs | README

README.md (1037B) - raw


      1 # Sublist
      2 
      3 Welcome to Sublist on Exercism's Perl 5 Track.
      4 If you need help running the tests or submitting your code, check out `HELP.md`.
      5 
      6 ## Instructions
      7 
      8 Given two lists determine if the first list is contained within the second
      9 list, if the second list is contained within the first list, if both lists are
     10 contained within each other or if none of these are true.
     11 
     12 Specifically, a list A is a sublist of list B if by dropping 0 or more elements
     13 from the front of B and 0 or more elements from the back of B you get a list
     14 that's completely equal to A.
     15 
     16 Examples:
     17 
     18  * A = [1, 2, 3], B = [1, 2, 3, 4, 5], A is a sublist of B
     19  * A = [3, 4, 5], B = [1, 2, 3, 4, 5], A is a sublist of B
     20  * A = [3, 4], B = [1, 2, 3, 4, 5], A is a sublist of B
     21  * A = [1, 2, 3], B = [1, 2, 3], A is equal to B
     22  * A = [1, 2, 3, 4, 5], B = [2, 3, 4], A is a superlist of B
     23  * A = [1, 2, 4], B = [1, 2, 3, 4, 5], A is not a superlist of, sublist of or equal to B
     24 
     25 ## Source
     26 
     27 ### Created by
     28 
     29 - @autark
     30 
     31 ### Contributed to by
     32 
     33 - @kytrinyx
     34 - @m-dango
     35 - @rfilipo