freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/data-structures/adjacency-matrix.arabic.md

1.3 KiB

id title challengeType videoUrl localeTitle
587d8256367417b2b2512c78 Adjacency Matrix 1

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert((adjMatUndirected.length === 5) && adjMatUndirected.map(function(x) { return x.length === 5 }).reduce(function(a, b) { return a && b }) , "<code>undirectedAdjList</code> should only contain five nodes.");'
  - text: ''
    testString: 'assert((adjMatUndirected[0][3] === 1) && (adjMatUndirected[3][0] === 1), "There should be an edge between the first and fourth node.");'
  - text: ''
    testString: 'assert((adjMatUndirected[0][2] === 1) && (adjMatUndirected[2][0] === 1), "There should be an edge between the first and third node.");'
  - text: ''
    testString: 'assert((adjMatUndirected[2][4] === 1) && (adjMatUndirected[4][2] === 1), "There should be an edge between the third and fifth node.");'
  - text: ''
    testString: 'assert((adjMatUndirected[3][4] === 1) && (adjMatUndirected[4][3] === 1), "There should be an edge between the fourth and fifth node.");'

Challenge Seed

var adjMatUndirected = [
];

Solution

// solution required