PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCareers
|Home/Coding & Algorithms/Upstart

Implement four string-processing functions

Last updated: Mar 29, 2026

Quick Overview

This question evaluates string-processing and list-manipulation skills, including character membership testing and sequence filtering, reflecting competency in handling textual data and traversal of collections.

  • medium
  • Upstart
  • Coding & Algorithms
  • Software Engineer

Implement four string-processing functions

Company: Upstart

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given four independent string/list problems. Implement each as a separate function. ## 1) Filter strings by shared characters **Input:** - `words`: a list of strings - `allowed`: a string **Task:** Return a new list containing only those strings in `words` for which **at least one character** in the word appears somewhere in `allowed`. **Notes/assumptions:** - Treat characters literally (e.g., case-sensitive unless you normalize explicitly). - Order of returned strings should match the original order. **Example:** - `words = ["abc", "xyz", "bzz", "DEF"]`, `allowed = "qb"` → output `[

Quick Answer: This question evaluates string-processing and list-manipulation skills, including character membership testing and sequence filtering, reflecting competency in handling textual data and traversal of collections.

Related Interview Questions

  • Implement Three Assessment Functions - Upstart (medium)
  • Solve Five OA Coding Tasks - Upstart (medium)
  • Solve Reported OA Coding Problems - Upstart (medium)
  • Decrypt a twice-encrypted message using known pairs - Upstart (medium)
  • Compute buffet revenue with capacity and waiting - Upstart (medium)
Upstart logo
Upstart
Jan 5, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
8
0
Loading...

You are given four independent string/list problems. Implement each as a separate function.

1) Filter strings by shared characters

Input:

  • words : a list of strings
  • allowed : a string

Task: Return a new list containing only those strings in words for which at least one character in the word appears somewhere in allowed.

Notes/assumptions:

  • Treat characters literally (e.g., case-sensitive unless you normalize explicitly).
  • Order of returned strings should match the original order.

Example:

  • words = ["abc", "xyz", "bzz", "DEF"] , allowed = "qb" → output `[

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Upstart•More Software Engineer•Upstart Software Engineer•Upstart 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
  • Careers
  • 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.