6 kyu

search in multidimensional array

985 of 1,438bakula

Description:

Write a function that gets a sequence and value and returns true/false depending on whether the variable exists in a multidimentional sequence.

Example:

locate(['a','b',['c','d',['e']]],'e'); // should return true
locate(['a','b',['c','d',['e']]],'a'); // should return true
locate(['a','b',['c','d',['e']]],'f'); // should return false
Arrays
Algorithms

More By Author:

Check out these other kata created by bakula

Stats:

CreatedNov 13, 2013
PublishedNov 13, 2013
Warriors Trained2807
Total Skips234
Total Code Submissions17705
Total Times Completed1438
JavaScript Completions985
Python Completions464
Total Stars50
% of votes with a positive feedback rating92% of 293
Total "Very Satisfied" Votes256
Total "Somewhat Satisfied" Votes29
Total "Not Satisfied" Votes8
Ad
Contributors
  • bakula Avatar
  • jhoffner Avatar
  • docgunthrop Avatar
  • cliffstamp Avatar
  • albertogcmr Avatar
  • G_kuldeep Avatar
Ad