Skip to content

sobulik/sortedLinkedList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorted linked list example

Prerequisities

  • JDK 8
  • Gradle 7

Run

./gradlew bootRun

Starts at http://localhost:8083.

Test

./gradlew test

Usage

Add to int list

curl -X POST localhost:8083/int -H 'Content-type:application/json' -d '42'
curl -X POST localhost:8083/int -H 'Content-type:application/json' -d '38'

Get i-th item from int list

curl -X GET localhost:8083/int/<i>

Remove i-th item from int list

curl -X DELETE localhost:8083/int/<i>

Add to string list

curl -X POST localhost:8083/string -H 'Content-type:application/json' -d 'foo'
curl -X POST localhost:8083/string -H 'Content-type:application/json' -d 'bar'

Get i-th item from string list

curl -X GET localhost:8083/string/<i>

Remove i-th item from string list

curl -X DELETE localhost:8083/string/<i>

Warning

Not user friendly. Casting, index out of bounds, etc. exceptions not handled. No user input validation.

About

A naive and incomplete implementation of sorted linked list in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages