Solution for Geektrust Backend Challenge - Meet The Family
We need to create a pre-populated family tree, that supports -
- Adding new Members to tree through
Mothers
- Determining all the people who hold a given relation with a member in the Family Tree.
- Names are Unique.
- New Members are added through
Mothers
.
- Only two Genders (Male & Female) are supported.
- A couple has a male & a female member.
- Names are case-sensitive.
- Family Tree is build left-to right in DFS order.
- Download the latest geektrust.jar
- Execute the following command replacing with the path for input file
java -jar geektrust.jar <path-to-inputfile>
OR
- Download the source code.
- Build the project using -
./gradlew clean build
- Use the generated
jar
frombuild/lib
folder and execute -
java -jar geektrust.jar <path-to-inputfile>