6 kyu

Area of a Shape

261 of 398user6270586

Description:

We'd like to know the area of an arbitrary shape. The only information of the shape is that it is bounded within the square area of four points: (0, 0), (1, 0), (1, 1) and (0, 1).

Given a function f(x, y) which returns a boolean representing whether the point (x, y) is inside the shape, determine the area of the shape. Your answer is allowed to differ from the true answer by at most 0.01.

Hint: http://bit.ly/1vJJt61

Statistics
Algorithms

Stats:

CreatedNov 25, 2014
PublishedNov 25, 2014
Warriors Trained1128
Total Skips36
Total Code Submissions1956
Total Times Completed398
Python Completions261
JavaScript Completions159
Total Stars35
% of votes with a positive feedback rating92% of 91
Total "Very Satisfied" Votes80
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes4
Total Rank Assessments8
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • user6270586 Avatar
  • jhoffner Avatar
Ad