โ† PhonePe questions

Count pairs with common prefix that is also a word

Filed under PhonePe

The question

Given a list of strings, count the number of pairs (A, B) such that A is a prefix of B and A is also present as a standalone word in the input list.

No write-up yet. Related questions below have one.

Related PhonePe questions

Collected from public candidate posts and coding forums. Updated Nov 2026.