FastPrepCheck Anagrams
Problems/Check Anagrams

Check Anagrams

Bloomberg LP logoBloomberg LP● EasyNEW GRADPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in many firsthand Bloomberg new-grad phone and onsite interviews. In our version, you return 1 when the letter counts match and 0 otherwise.

You are given two strings s and t.

Determine whether the two strings are anagrams of each other. Two strings are anagrams if they contain exactly the same characters with the same frequencies, possibly in a different order.

Return 1 if the strings are anagrams, otherwise return 0.

Function

checkAnagrams(s: String, t: String) → int

Examples

Example 1

s = "listen"t = "silent"return = 1

listen and silent contain the same letters with the same frequencies.

Example 2

s = "race"t = "care"return = 1

race and care are anagrams.

Example 3

s = "hello"t = "world"return = 0

The two strings do not have matching character frequencies.

Constraints

  • s and t consist of printable characters.
  • The comparison is case-sensitive.

More Bloomberg LP Phone Screen questions

  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026
  • Recommend Films from Viewers Who Watched Everything You DidPHONE SCREEN · Seen Nov 2026
  • Track New Values in Sorted OrderPHONE SCREEN · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Shared Courses for Every Pair of StudentsCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Count Adjacent Symbol Pairs for BPEAmazon · ONSITE INTERVIEW
  • Portfolio Valuation, Part 1Stripe · PHONE SCREENStripe interview questions
  • Map and Accumulate Learning QueriesPalantir · ONSITE INTERVIEWPalantir interview questions
  • Summarize Server Healthcheck LogsNVIDIA · PHONE SCREENNVIDIA interview questions
  • Convert an Entry List to a MapEPAM · PHONE SCREENEPAM interview questions
  • Best Anagram MatchGoogle · PHONE SCREENGoogle interview questions
  • Filter Anagrams of a TargetMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Word Frequency in a Large TextRobinhood · PHONE SCREENRobinhood interview questions
  • Check AnagramsDeloitte · ONSITE INTERVIEWDeloitte interview questions

Interview reports that mention this question

  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
  • Bloomberg New Grad SWE Interviews: 98 Experiences (Part 1 of 5)

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int checkAnagrams(String s, String t) {
      // write your code here
    }
}
Checking account…