https://github.com/dbc2201/javacodingproblem1
https://github.com/dbc2201/javacodingproblem1
java java-coding-challenges
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dbc2201/javacodingproblem1
- Owner: dbc2201
- License: mit
- Created: 2022-05-13T19:01:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-26T06:43:18.000Z (about 3 years ago)
- Last Synced: 2025-04-13T05:42:48.173Z (2 months ago)
- Topics: java, java-coding-challenges
- Language: Java
- Homepage: https://www.packtpub.com/product/java-coding-problems/9781789801415
- Size: 49.8 KB
- Stars: 1
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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/)