akrivohlavy / the-problematic-api Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
(Optional) Modify update/create Problem operations to validate the input data. Reject requests for empty problems and respond accordingly.
From the requirements:
User can answer a Problem. Only correct answers are accepted.
...You should
...
Ignore existing solutions for the expression solver or built in JS functions (like eval). We will be impressed by your algorithm. If you can't make it, don't worry, an existing solver is better than none. The solver is also a single non-trivial business logic in the task.
"It is 42"
(via static config)From the requirements:
- User can create a new Problem. A Problem can be either riddle or math expression - more on that below.
- User can update, delete, read and list Problems.
...
- Modify update, delete operations so that only users who created those Problems can perform this action.
Broken down to operations:
users desired action | parameters | response | notes |
---|---|---|---|
list | *filter by Problem type, answered/unanswered status | Problem[] | |
read | |||
create | Problem | Created Problem URI | *validation |
update | Problem | owner-protection, *validation | |
delete | owner-protection |
* part of optional requirements
(Optional) Modify Problems List to support filtering by Problem type and by answered / unasnwered for current user
Firstly we need to know what we are making. Therefore designing our API (in a machine-readable manner too) is the first step.
- Ignore existing solutions for the expression solver or built in JS functions (like eval). We will be impressed by your algorithm. If you can't make it, don't worry, an existing solver is better than none. The solver is also a single non-trivial business logic in the task.
- (Bonus) Enhance your solver with binary operators */, unary operators -+ and operator precedence.
Authenticate users using Basic access authentication. No need to verify against any database - assume password is always correct. Use username from BA credentials to identify the User.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.