These are chat archives for camperbot/bonfire-no-repeats-please

7th
Sep 2015
Rich Hopkins
@Rich-Hopkins
Sep 07 2015 03:00
Bonfire: Where art thou
CamperBot
@camperbot
Sep 07 2015 03:00

:fire:Bonfire: Where art thou :link:

function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });

Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument).

more info:  bf details | bf links | hint

Rich Hopkins
@Rich-Hopkins
Sep 07 2015 03:04
Are these things marked "more info" below the camperbot's post supposed to be links?
Bonfire: Where art thou
CamperBot
@camperbot
Sep 07 2015 03:04

:fire:Bonfire: Where art thou :link:

function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });

Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument).

more info:  bf details | bf links | hint

anknits
@anknits
Sep 07 2015 05:53
@Rich-Hopkins these are queries that you can type in for more information. Just like the bonfire name you type.
say
hint
CamperBot
@camperbot
Sep 07 2015 05:54

hint [1/2]

## :construction: After this are possible spoiler hints.

Make sure you've tried to hard to solve it yourself before proceeding. :construction:

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Mihai Manole
@mesterum
Sep 07 2015 17:23
@anknits impossiblePerm(c) it's my function which checks if perm. c is possible. 'aa', 'baaa','aaa' are impossible. Let c.size() be a function that sum for each index i in c, i*c[i] and c.maxGroup() be the greatest index i for c[i]>0. In fact c.size is the length of the string and c.maxGroup is the greatest number of identical letters. Then impossiblePerm(c)=(c.size()-c.maxGroup() < c.maxGroup()-1)