Halloween Sale
Unlock all premium questions for over 30% off
Recipes From Available Ingredients
Easy
Question
The array recipes holds N recipes. Each recipe is a string that spells out what it needs, one character per unit of an ingredient; "salsa", for instance, calls for two 's', two 'a' and one 'l'. What the pantry holds is given as ingredients, where each character stands for one unit on hand. A recipe can be cooked when, for every ingredient it uses, the pantry holds at least as many units as the recipe asks for. Count the recipes that can be cooked.
...
Asked at:Microsoft
More Microsoft interview questions
- Longest Proper Prefix And Suffixmedium
- Minimum Flips for Symmetric Gridmedium
- Largest Square from Mixed Tilesmedium
- Maximize Edge Label Sum in Graphmedium
- Set Even Parity Biteasy
- Design Recent Files Trackereasy
- Build the Longest Spike Sequencemedium
- Lowercase Before Uppercase Letter Countmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.