CP-DSA-Questions
CP-DSA-Questions copied to clipboard
Magic Spells Hackerrank
While playing a video game, you are battling a powerful dark wizard. He casts his spells from a distance, giving you only a few seconds to react and conjure your counterspells. For a counterspell to be effective, you must first identify what kind of spell you are dealing with.
The wizard uses scrolls to conjure his spells, and sometimes he uses some of his generic spells that restore his stamina. In that case, you will be able to extract the name of the scroll from the spell. Then you need to find out how similar this new spell is to the spell formulas written in your spell journal.
Spend some time reviewing the locked code in your editor, and complete the body of the counterspell function.
Check Dynamic cast to get an idea of how to solve this challenge.
Related Issue
- Info about the related issue
Closes: #[issue number that will be closed through this PR]
Describe the changes you've made
Give a clear description what modifications you have made
Mention any unusual behaviour of your code (Write NA if not)
Any unusual behaviour of your code
Checklist:
(To mark, write x inside the square brackets like this: [x])
- [ ] My code follows the guidelines of this project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly whereever it was hard to understand.
- [ ] My changes generate no new warnings.
Additional Info (optional)
Any additional information you want to give
Have you opened an issue for this?