Question 1: Solution is done in java it can be found HERE
Requirements to run the solution
- Java jdk or jre or any jvm installed on your pc. Can be installed from this LINK.
- Any of your favourite Java IDE. This solutions were written using Intellij IDE.
- Basic level ide knowledge to just import project and run the code.
To run solution
- Import or open the source code in any java ide software.
- Navigate to
DartSolution>src
- click Main to open file in workspace area.
- Click run.
- Solution is in
Darts.java
Class.
Question 2: Solution is also done in java it can be found HERE
Knapsack solution Requirements to run the solution
- Java jdk or jre or any jvm installed on your pc. Can be installed from this LINK.
- Any of your favourite Java IDE. This solutions were written using Intellij IDE.
- Basic level ide knowledge to just import project and run the code.
To run solution
- Import or open the source code in any java ide software.
- Navigate to Knapsack>src
- click Knapsack.java to open file in workspace area.
- You can change the values and the weights.
int val[]
andint wt[]
arrays and also the max weightw
. - Run the code to get the highest value the thief can carry
- Implementation is in
ComputeKnapsack
class.
Question 3: Querying the SwapiAPI
Swapi API Requirements to run the solution
- PHP preferably version 5+ installed on your pc since this has been done using php
- Basic php knowledge.
- apache or nginx web server installed on your pc to run the source code from.
- Web browser to run the code
- internet connection to get bootstrap dependencines loaded.
- Any code editor
To run solution
- pull the source code, put it in htdocs if using xampp.
- Start your apache web server
- on the browser open
http://localhost/swapi/
- you can be able to clisk and test the functionalities .
Question 4: Borrowing friends and iou's
Borrowing friends Requirements to run the solution
- Python runtime.
- Any code editor that supports python.
- Basic python knowledge
To run solution
- pull the source code, put it in any location in your pc.
- navigate to the location.
- run
python rest_api_test.py
alternatively
- open code in any python supported code editor.
- open
rest_api_test.py
- Run the code