WhatsApp Interview Question

tries, string matching with a wildcard