PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Instacart

Decode a password string into letters

Last updated: Mar 29, 2026

Quick Overview

This question evaluates string parsing and encoding/decoding skills, specifically mapping numeric tokens and handling delimiter characters within the Coding & Algorithms domain and focusing on practical implementation-level string manipulation.

  • hard
  • Instacart
  • Coding & Algorithms
  • Software Engineer

Decode a password string into letters

Company: Instacart

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

A password is encoded as a string `s` using the following rules: - Numbers `"1"` to `"9"` map to letters `a` to `i`. - Numbers `"10#"` to `"26#"` (two digits followed by `#`) map to letters `j` to `z`. For example: - `"1" -> "a"` - `"9" -> "i"` - `"10#" -> "j"` - `"26#" -> "z"` **Task**: Given the encoded string `s`, return the decoded lowercase string. **Input/Output** - Input: a single string `s` consisting of digits and `#`. - Output: the decoded string. **Constraints** - `1 <= len(s) <= 1000` - The input is guaranteed to be a valid encoding. **Examples** - `s = "10#11#12"` → `"jkab"` - `s = "1326#"` → `"acz"` (Implementation note: you may need to manually parse the input string and handle `#` correctly.)

Quick Answer: This question evaluates string parsing and encoding/decoding skills, specifically mapping numeric tokens and handling delimiter characters within the Coding & Algorithms domain and focusing on practical implementation-level string manipulation.

Related Interview Questions

  • Implement an In-Memory File Storage System - Instacart (medium)
  • Decode an encoded string - Instacart (medium)
  • Evaluate an arithmetic expression - Instacart (medium)
  • Implement worker time and payroll tracker - Instacart (hard)
  • Solve Two Sorted-Array Tasks - Instacart (hard)
Instacart logo
Instacart
Jan 22, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
11
0
Loading...

A password is encoded as a string s using the following rules:

  • Numbers "1" to "9" map to letters a to i .
  • Numbers "10#" to "26#" (two digits followed by # ) map to letters j to z .

For example:

  • "1" -> "a"
  • "9" -> "i"
  • "10#" -> "j"
  • "26#" -> "z"

Task: Given the encoded string s, return the decoded lowercase string.

Input/Output

  • Input: a single string s consisting of digits and # .
  • Output: the decoded string.

Constraints

  • 1 <= len(s) <= 1000
  • The input is guaranteed to be a valid encoding.

Examples

  • s = "10#11#12" → "jkab"
  • s = "1326#" → "acz"

(Implementation note: you may need to manually parse the input string and handle # correctly.)

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Instacart•More Software Engineer•Instacart Software Engineer•Instacart Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.