Problem 61032. The MATLAB Treasure Hunt – Count Matching Symbols on the Ancient Scroll to Unlock the Next Clue

Inside the Hidden Cave, you discover an ancient scroll filled with strange symbols and markings.
A note beside it says: “Count those that mirror the key symbol — they guide your way.”
Given a character array or string s and a single character key, count how many times key appears in s.
Return this count as n.
Each correct count reveals one rune on the treasure map!

Solution Stats

85.71% Correct | 14.29% Incorrect
Last Solution submitted on Oct 24, 2025

Solution Comments

Show comments

Problem Recent Solvers12

Suggested Problems

More from this Author22

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!