PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/DoorDash

Implement string pattern matching

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency with string pattern matching algorithms, including handling wildcard semantics and algorithmic complexity analysis, within the coding and algorithms domain.

  • Medium
  • DoorDash
  • Coding & Algorithms
  • Software Engineer

Implement string pattern matching

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Implement a function that finds the first occurrence of a pattern P in a text T and returns the starting index (or -1 if not found). Follow-ups: compare the naive method to KMP and Rabin–Karp; extend the matcher to support wildcard characters '?' (match any single char) and '*' (match any sequence); discuss time and space complexity and key edge cases (empty strings, repeated patterns, very long inputs).

Quick Answer: This question evaluates proficiency with string pattern matching algorithms, including handling wildcard semantics and algorithmic complexity analysis, within the coding and algorithms domain.

Related Interview Questions

  • Maximize Chef Assignment Profit - DoorDash (medium)
  • Compute Courier Delivery Pay - DoorDash (easy)
  • Compute Nearest Destination Distances - DoorDash (easy)
  • Compute Driver Pay with Double-Pay Windows - DoorDash (medium)
  • Count changed nodes between two menu trees - DoorDash (hard)
DoorDash logo
DoorDash
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0

Implement a function that finds the first occurrence of a pattern P in a text T and returns the starting index (or -1 if not found). Follow-ups: compare the naive method to KMP and Rabin–Karp; extend the matcher to support wildcard characters '?' (match any single char) and '*' (match any sequence); discuss time and space complexity and key edge cases (empty strings, repeated patterns, very long inputs).

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 8,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.