Skip to content
Vincent Oliveira edited this page Sep 6, 2016 · 2 revisions

Tiller Test Dev Backend - Test #6

What should I do ?

Write a program that outputs all possibilities to put + or - or nothing between the numbers 1, 2, ..., 9 (in this order) such that the result is always 100.

For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100. Formatted as "1+2+34-5+67-8+9".

Where should I write my code ?

    //src/AppBundle/Controller/Test6Controller
    
    public function test6Action(Request $request)
    {
        $result = null;
        
        return new JsonResponse($result, JsonResponse::HTTP_OK);
    }

How can I test my code ?

$ curl -H "Content-Type: application/json" -X POST test.local/test6
<List of operations>

Clone this wiki locally