Challenge 49 – De ja vu All over again
To perform effectively as a software application developer, one must be acquainted with various facets of application development. To test the skills of application developers, Superior Consulting Services (SCS) offers a series of technical coding challenges designed to challenge and educate application developers. This blog addresses problem solving and algorithm development, and presents SCS’ forty ninth (49th) challenge: De ja vu All over again
Let’s get ready to rumble
Each SCS challenge will require the user to solve a problem. All questions are designed to be solvable by mid-level application developers in one hour or less. The 49th challenge is shown below.
Recursive functions in code often rely on loop setups, where the initial variable is called on multiple times while being altered by the loop. Simple examples of a recursive function include the factorial, where an integer is multiplied by itself while being incrementally lowered. Many other self-referencing functions in a loop could be called recursive functions, for example, where n = n + 1 given an operating range.
In addition to simpler recursive functions, programmers and others have come up with much more elaborate functions that also work through principles of recursion. Some, like the Fibonacci sequence, have applications to finance and other areas, where others remain esoteric and largely exclusive to the IT Community.1
2nd Degree Polynomial
Second degree polynomials are also known as quadratic polynomials. Their shape is known as a parabola and take the form of Y = ax2+bx+c.
Challenge 49 involves the creation of a Recursive Function to find, compute, and approximate the positive area (where Y >= 0) under a curve for an expression given as a 2nd degree polynomial. The polynomial to compute is Y = -1/2*X2 + X + 8.
- Create a function using recursion, to compute the positive area under the curve above.
- Any programming language can be used.
- Contestant challenge submittals should be emailed to firstname.lastname@example.org, Subject Line SCS Coding Challenge #49.
- Reponses to Challenge #49 should be received by 5:00 pm CDT, May 31st, 2019.
- In the event of a tie between two or more winning solutions, the first solution received will receive the prize; however, all submitters with good solutions will be recognized.
- Employees of SCS are not eligible to participate in the coding challenge.
The best solution submitted will receive an Amazon.com gift certificate worth $25.00 (U.S. dollars) and have the winning solution, along with the winner’s name, on the SCS website: www.teamscs.com.