---
title: "Discussion on \"📅 Day 29 of DSA Journey\nCounting Character Frequency (Map vs Object)\" | Hashnode"
description: "Discussion on \"📅 Day 29 of DSA Journey\nCounting Character Frequency (Map vs Object)\". Explore character frequency counting using Map and Object in JavaScript for efficient data handling in coding interviews and problem-solving"
url: "https://hashnode.com/posts/day-29-of-dsa-journey-counting-character-frequency-map-vs-object/698ca63bdf7879c4dc3ec519"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [📅 Day 29 of DSA Journey Counting Character Frequency (Map vs Object)](https://richak.hashnode.dev/day-29-of-dsa-journey-counting-character-frequency-map-vs-object?utm_source=hashnode&utm_medium=feed)

Explore character frequency counting using Map and Object in JavaScript for efficient data handling in coding interviews and problem-solving

Feb 11 · 4 min read · richak.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#dsawithricha](https://hashnode.com/tag/dsawithricha)
-   [#hashnode](https://hashnode.com/tag/hashnode)
-   [#learning](https://hashnode.com/tag/learning)
-   [#learning-journey](https://hashnode.com/tag/learning-journey)

## Written by

[Richa](https://hashnode.com/@Richa000)

@Richa000 · India

  
[View profile](https://hashnode.com/@Richa000)

Senior Frontend Engineer • Building Scalable UI Systems

Hi, I’m Richa — a Senior Frontend Engineer with 5+ years of experience building scalable, production-grade web interfaces for enterprise and consumer applications. I work primarily with React, TypeScript, and modern frontend architectures, focusing on component systems, performance, and maintainability. Most of my experience comes from building real-world products in regulated domains like banking and insurance, where clarity, reliability, and long-term ownership matter more than quick demos. Through this blog, I write about frontend engineering fundamentals, scalable UI design, problem-solving, and the lessons I’ve learned working on large codebases. My goal is to share practical insights — not shortcuts — for developers who want to grow strong engineering foundations. I also mentor early-career developers and strongly believe that curiosity, asking the right questions, and understanding why something works are more important than memorizing tools. If you’re serious about improving as an engineer, you’re in the right place.

## Responses 1

Markdown supported · ⌘↵ to post

[Ankit Kumar](https://hashnode.com/@anki1kr)

[Nov 25](https://hashnode.com/posts/day-29-of-dsa-journey-counting-character-frequency-map-vs-object/698ca63bdf7879c4dc3ec519/comment/6b06663b48f57f1c3363d9f7)

Character frequency with `Map` vs `{}` is a great example of a small building block that quietly powers half of JS string and sliding-window questions (anagrams, first unique char, longest substring with k distinct chars). One quick JS gotcha worth keeping in mind for interviews: plain objects `{}` inherit prototype keys like `constructor` or `toString` unless you use `Object.create(null)` or `Map`, so `Map` is safer whenever input strings are arbitrary.

Also, since you work on frontend: do not feel pressured to grind an entire 450-problem competitive-style sheet before interviewing. When we mapped 390 curated problems across 31 tech roles, Frontend Engineer interviews centered on 6 core topics (87 core problems, 120 including second-tier), whereas Backend/SDE loops leaned on 10 core topics (276 core problems).

I built a free role-ordered tracker if you want to see the frontend-first topic order : [dsatracker.tech/for/frontend-engineer](https://dsatracker.tech/for/frontend-engineer?ref=hashnode-c13)
