PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Faire

Find First Haiku in Sentence

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithm design and string-processing skills, focusing on mapping words to syllable counts and identifying contiguous subsequences under an O(N) time constraint.

  • Medium
  • Faire
  • Coding & Algorithms
  • Software Engineer

Find First Haiku in Sentence

Company: Faire

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

##### Question Given a sentence with mixed case and punctuation plus a syllable dictionary mapping each word to its syllable count, design an O(N)-time algorithm that returns the first contiguous 5-7-5 Haiku (three strings) or None if none exists. Explain your approach and its complexity.

Quick Answer: This question evaluates algorithm design and string-processing skills, focusing on mapping words to syllable counts and identifying contiguous subsequences under an O(N) time constraint.

Related Interview Questions

  • Print a Centered Pascal Triangle - Faire (medium)
  • Format text into fixed-width justified lines - Faire (hard)
  • Find first 5-7-5 haiku in sentence - Faire (Medium)
Faire logo
Faire
Aug 4, 2025, 10:55 AM
Software Engineer
Technical Screen
Coding & Algorithms
4
0
Question

Given a sentence with mixed case and punctuation plus a syllable dictionary mapping each word to its syllable count, design an O(N)-time algorithm that returns the first contiguous 5-7-5 Haiku (three strings) or None if none exists. Explain your approach and its complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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