https://github.com/monikakonieczna/java-practice
Examples of solved tasks from the area of simple algorithms, operations on Lists, Strings, Streams etc.
https://github.com/monikakonieczna/java-practice
java-lists java-math-library java-practice java-stream-api java-string simple-algorithms
Last synced: 2 months ago
JSON representation
Examples of solved tasks from the area of simple algorithms, operations on Lists, Strings, Streams etc.
- Host: GitHub
- URL: https://github.com/monikakonieczna/java-practice
- Owner: monikakonieczna
- Created: 2022-10-04T11:15:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T11:26:22.000Z (about 2 years ago)
- Last Synced: 2025-01-26T14:07:28.901Z (4 months ago)
- Topics: java-lists, java-math-library, java-practice, java-stream-api, java-string, simple-algorithms
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Simple algorithms and collections in Java exercises
## Introduction
This GitHub project was created to serve as a playground for practicing simple algorithms, Java Stream API and Java
collections.## IDE Setup
This project uses Lombok Library which a java library that automatically plugs into your editor and build tools, spicing up your java.
To configure your IDE for the support of Lombok, check
out [the official documentation](https://projectlombok.org/) for detail.## Exercises
### Java Stream API
There are exercises which introduce the Stream API usage including filtering, sorting and the output to
various formats.
1.Find 1 element on the lists which starts with given letter/word.
2.Find first/last element in the list.
3.Sort elements on the list in reverse/natural order.
4.Eliminate duplicates in the list.### Simple algorithms
1. *Change making problem* addresses the question of finding the minimum number of coins that add up to a given amount of
money.
It is a special case of the integer knapsack problem.### Java Math Exercises
1. Count the average of 3 integers.
2. Calculate average value of integers from a list.
3. Calculate factorial for injected integer.
4. Find n-th element from the fibonacci sequence.### Java String Exercises
1.Check if text is a Palindrome.
2.Reverse the String.### Java List Exercises
1. FizzBuzz exercise
2. Find 2 the smallest numbers from the list. Ignore the repetitions.
3. Find 2 elements in list whose sum is closest to zero.
4. Find first element in the list starting with letter "A" with the usage of Regex.