https://github.com/s4kibs4mi/journi-tvads
https://github.com/s4kibs4mi/journi-tvads
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/s4kibs4mi/journi-tvads
- Owner: s4kibs4mi
- Created: 2019-11-22T09:54:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-22T12:15:12.000Z (almost 6 years ago)
- Last Synced: 2025-01-18T10:28:05.338Z (9 months ago)
- Language: Kotlin
- Size: 58.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Journi TvAds
Implemented the project in `Kotlin` as per mention in the requirement in problem statement that any JVM language can be used and expected a functional approach.
As I am not experienced with `Scala` but `Kotlin`, so chosen `Kotlin`.#### Build
```bash
./gradlew fatJar
```#### Clean
```bash
./gradlew clean
```#### Run
```bash
java -jar ./build/libs/journi-tvads-1.0.jar {path_json_file}
```### Performance
```bash
The basic solution runs on: O(n*m)
where,
- n is the number of users
- m is the number of tvSpots
``````
The improved solution runs on: O(nlog(m))
where,
- n is the number of users
- m is the number of tvSpots
improved it using binary search technic to find tvSpot
```* Note : I have assumed the tvSpot times are in increasing order which is sorted.