Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5df2aad
Update README.md
Artemiy7 May 2, 2023
4c04e69
Create LongMap interface
Artemiy7 May 2, 2023
391b8ef
Create LongMapImpl class
Artemiy7 May 2, 2023
d735853
Added JUnit dependency
Artemiy7 May 2, 2023
66e5a1e
Created LongMapImplTest
Artemiy7 May 2, 2023
2cc8aa1
Updated .gitignore added target folder restriction
Artemiy7 May 2, 2023
187a4e9
Add .circleci/config.yml
Artemiy7 May 2, 2023
a74486a
Merge pull request #1 from Artemiy7/circleci-project-setup
Artemiy7 May 2, 2023
57e51fa
Added Circle CI status badge
Artemiy7 May 2, 2023
65e8683
Added picture
Artemiy7 May 2, 2023
465367b
Updated comments removed redundant imports
Artemiy7 May 2, 2023
bddf065
Merge branch 'master' of https://github.com/Artemiy7/long-map
Artemiy7 May 2, 2023
19097d6
Updated Readme added time complexity text
Artemiy7 May 3, 2023
c1aa810
Updated Readme changed font size
Artemiy7 May 3, 2023
1a5a084
Changed comments
Artemiy7 May 3, 2023
7307ab9
Updated toString() fixed bug
Artemiy7 May 3, 2023
d6493b2
Merge branch 'master' of https://github.com/Artemiy7/long-map
Artemiy7 May 3, 2023
2038d00
Added comments to get(long key)
Artemiy7 May 3, 2023
f847b92
Updated comments to get(long key)
Artemiy7 May 3, 2023
5712a31
Updated LongMapImplTest
Artemiy7 May 3, 2023
cb8f40b
Update README.md
Artemiy7 May 3, 2023
c6a4943
Update Readme, changed picture
Artemiy7 May 3, 2023
fe6b7a4
Updated LongMapImpl remove(long key)
Artemiy7 May 8, 2023
4b9e8aa
Merge branch 'master' of https://github.com/Artemiy7/long-map
Artemiy7 May 8, 2023
7c3fc14
Updated LongMapImpl remove(long key) fixed bug
Artemiy7 May 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
build-and-test:
# These next lines define a Docker executor: https://circleci.com/docs/2.0/executor-types/
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# Be sure to update the Docker image tag below to openjdk version of your application.
# A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/openjdk
docker:
- image: cimg/openjdk:11.0
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
# Use mvn clean and package as the standard maven build phase
- run:
name: Build
command: mvn -B -DskipTests clean package
# Then run your tests!
- run:
name: Test
command: mvn test

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- build-and-test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
.target/
long-map.iml
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# long-map

Finish development of class LongMapImpl, which implements a map with keys of type long. It has to be a hash table (like HashMap). Requirements:
* it should not use any known Map implementations;
* it should use as less memory as possible and have adequate performance;
* the main aim is to see your codestyle and teststyle
## unit tests: [![CircleCI](https://dl.circleci.com/status-badge/img/gh/Artemiy7/long-map/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Artemiy7/long-map/tree/master)

## time complexity text:
I added 201 entries to the LongMap using different numbers and displayed the distribution of entries in buckets on the graph.
- ![#c5f015](https://placehold.co/15x15/c5f015/c5f015.png) Average case using new Random().nextlong()
- ![#f03c15](https://placehold.co/15x15/f03c15/f03c15.png) Worst case using numbers with same ending number e.g.: 7777, 7777777, 1113337
- ![#1589F0](https://placehold.co/15x15/1589F0/1589F0.png) Log(201) for comparison

![map](https://user-images.githubusercontent.com/83453822/235929762-c5aa80d2-5caf-4e80-a91c-43938790efdf.png)
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
</dependencies>
</project>
Loading