freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/zhang-suen-thinning-algorit...

2.2 KiB

title id challengeType videoUrl localeTitle
Zhang-Suen thinning algorithm 594810f028c0303b75339ad7 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert.equal(typeof thinImage, "function", "<code>thinImage</code> must be a function");'
  - text: ''
    testString: 'assert(Array.isArray(result), "<code>thinImage</code> must return an array");'
  - text: ''
    testString: 'assert.equal(typeof result[0], "string", "<code>thinImage</code> must return an array of strings");'
  - text: ''
    testString: 'assert.deepEqual(result, expected, "<code>thinImage</code> must return an array of strings");'

Challenge Seed

const testImage = [
  '                                                          ',
  ' #################                   #############        ',
  ' ##################               ################        ',
  ' ###################            ##################        ',
  ' ########     #######          ###################        ',
  '   ######     #######         #######       ######        ',
  '   ######     #######        #######                      ',
  '   #################         #######                      ',
  '   ################          #######                      ',
  '   #################         #######                      ',
  '   ######     #######        #######                      ',
  '   ######     #######        #######                      ',
  '   ######     #######         #######       ######        ',
  ' ########     #######          ###################        ',
  ' ########     ####### ######    ################## ###### ',
  ' ########     ####### ######      ################ ###### ',
  ' ########     ####### ######         ############# ###### ',
  '                                                          '];

function thinImage(image) {
  // Good luck!
}

After Test

console.info('after the test');

Solution

// solution required