Lab 2: Three Challenges from Hackerank

Evan Misshula

<2018-09-27 Thu>

Hackerank

HackerRank is a technology company[1] that focuses on competitive pro- gramming challenges for both consumers and businesses, where develop- ers compete by trying to program according to provided specifications.[2][3] HackerRank’s programming challenges can be solved in a variety of program- ming languages (including Java, C++, PHP, Python, SQL, JavaScript) and span multiple domains.[4] On the consumer side, when a programmer submits a solution to a pro- gramming challenge, their submission is scored on the accuracy of their out- put. Programmers are then ranked globally on the HackerRank leaderboard and earn badges based on their accomplishments to drive competition among users. In addition to individual programming challenges, HackerRank also hosts contests (often referred to by HackerRank as "CodeSprints") where users compete on the same programming challenges during a set period of time and are then ranked at the conclusion of the event. HackerRank is part of the growing gamification trend within competitive computer program- ming[5] and the consumer-side of their website is free for coders to use.

Step 1

Create a free hackerrank account. https://www.hackerrank.com/dashboard

Step 2

Look at the Functionial programming challenges on Hackerank. https:// www.hackerrank.com/domains/fp?filters%5Bstatus%5D%5B%5D=unsolved

1 Step 3

Select and solve three problems from the functional programming challenges

Step four

Take a screen shot of the Congratulations screen to show that it passed the test.

Step 5

Attach the solutions as three separate .hs files

Step 6 create a lab document

1. Your lab must be a document PDF, docx and ODS formats are ac- ceptable

2. Copy the Question you solved and embed the screen shot after it.

3. You must email me with the subject line: Lab #1 submission and at- tach the document which you should name Lab-2-FirstName-LastName.<fileType>

Appendix

Problem 1: You are given the cartesian coordinates of a set of points in a plane. When traversed sequentially, these points form a Polygon, , which is not self-intersecting in nature. Can you compute the area of polygon ?

2 3