An open API service indexing awesome lists of open source software.

https://github.com/dbc2201/javacodingproblem1


https://github.com/dbc2201/javacodingproblem1

java java-coding-challenges

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

[![Test Case Report](https://github.com/dbc2201/JavaCodingProblem1/actions/workflows/maven.yml/badge.svg?event=push)](https://github.com/dbc2201/JavaCodingProblem1/actions/workflows/maven.yml)
# Java Coding Problems

## Chapter 1: Strings, Numbers, and Math

---

### Problem Statement : Counting Duplicate Characters

Write a program that counts duplicate characters from a given `String`.

### Sample Input 1

```
"aabcc"
```

### Sample Output 1

```
{a=2, b=1, c=2}
```

---

* [Source Code](src/main/java/io/github/dbc/DuplicateCharactersCounter.java)
* [Main Class](src/main/java/io/github/dbc/Main.java)
* [Test Class](src/test/java/io/github/dbc/DuplicateCharactersCounterTest.java)

---
> Question taken from the book
> ["Java Coding Problems"](https://www.packtpub.com/product/java-coding-problems/9781789801415) by
> [Anghel Leonard](https://github.com/AnghelLeonard).
> Formatted and uploaded by [dbc2201](https://github.com/dbc2201)

---

**Suggested Reading:**

1. [HashMap (Java SE 18 & JDK 18)](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/HashMap.html)
2. [Managing the Content of a Map (dev.java)](https://dev.java/learn/managing-the-content-of-a-map/)