coderz.py

Keep Coding Keep Cheering!

Autocomplete System Implementation

Build an autocomplete system that, given a query string s and a set of possible query strings returns all strings from the set that start with s as a prefix.

January 10, 2025 | dsa, DSA Sheet, Twitter | No comments

Count Decoding Ways for Encoded Messages

Problem Statement (Asked By Facebook) Given the mapping a = 1, b = 2, …, z = 26, and an encoded message, count the number of possible ways to decode it. For example, the message ‘111’ would give 3, since it could be decoded as ‘aaa’, ‘ka’, and ‘ak’. You can assume that the messages […]

January 5, 2025 | DP, dsa, DSA Sheet, Facebook | No comments

Advertisement