PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/PayPal

Count Word Frequency and Print Top Three Words

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in basic Python programming, string/text processing, frequency counting and sorting algorithms, reflecting core competencies for data manipulation tasks.

  • Medium
  • PayPal
  • Coding & Algorithms
  • Data Scientist

Count Word Frequency and Print Top Three Words

Company: PayPal

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

##### Scenario First-round Python coding screening ##### Question Using only basic Python, write a function that receives a list of strings and returns a dictionary mapping each unique word to its frequency. Then print the three most frequent words in descending order. ##### Hints Build dict with a for-loop; sort by value to get top-3.

Quick Answer: This question evaluates proficiency in basic Python programming, string/text processing, frequency counting and sorting algorithms, reflecting core competencies for data manipulation tasks.

Related Interview Questions

  • Minimize a String Using Allowed Swaps - PayPal (medium)
  • Compute variance of a list in Python - PayPal (easy)
  • Explain list vs tuple in Python - PayPal (easy)
  • Solve common search/parse/graph frequency tasks - PayPal (medium)
  • Explain differences between Python list and tuple - PayPal (hard)
PayPal logo
PayPal
Aug 4, 2025, 10:55 AM
Data Scientist
Onsite
Coding & Algorithms
4
0
Scenario

First-round Python coding screening

Question

Using only basic Python, write a function that receives a list of strings and returns a dictionary mapping each unique word to its frequency. Then print the three most frequent words in descending order.

Hints

Build dict with a for-loop; sort by value to get top-3.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More PayPal•More Data Scientist•PayPal Data Scientist•PayPal Coding & Algorithms•Data Scientist 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.