git clone https://github.com/mvladoi/sinch-task.git
cd springboot
mvn spring-boot:run
- a.
Action HTTPS
Verb POST
URL sinch-assignment/all-pairs
Description Exercise 1
- b.
Action HTTPS
Verb POST
URL sinch-assignment/polish-notation
Description Exercise 2
-
All pair is the coding exercise :
Count pairs with given sum
O(n) time -
Polish notation is the coding exercise:
Evaluation of Prefix Expressions
O(n) time
curl -X POST https://sinch-gateway-dcx6qn7w.nw.gateway.dev/sinch-assignment/polish-notation/?key=AIzaSyBigpr5hghSfwqwCKoeLzcRpImjrq3qUIU --data-binary @sinch/springboot/input_files/polish_notation/file1 -H "Content-Type: application/text"
Response:
{result: 42.00, 1337.00, -12.50, 100500.00, error, error}
curl -X POST https://sinch-gateway-dcx6qn7w.nw.gateway.dev/sinch-assignment/all-pairs/?key=AIzaSyBigpr5hghSfwqwCKoeLzcRpImjrq3qUIU --data-binary @sinch/springboot/input_files/all_pairs/file1 -H "Content-Type: application/text"
Response:
{result: 2}
- Improve the testing with different test cases (add suport for input files that contains empty lines)
- Improve the api response code in case of failures