Summary
I had a 2-round interview experience with Savantlabs for a Senior Software Engineer role, which included a coding assignment and a technical interview with two specific graph-related coding questions, ultimately resulting in a rejection.
Full Experience
R1
2 hour coding assignment. Question at the end.
R2
2 hour interview
Q1: You are given a graph of cities with name as integer, and an start city. At minute 0, an infection starts from the city with value start.
Each minute, a city becomes infected if:
The city is currently uninfected.The city is adjacent to an infected city.
Return the number of minutes needed for the entire tree to be infected.
graph = ["1->5", "1->3", "5->4", "4->9", "4->2", "3->10", "3->6"]
start = 3
output = 4
Q2: Write code to print dfs and bfs of a given graph. The node information will be user-defined (unlike the typical leetcode graphs where node values will be 0, 1, 2 and so on).
R1 Coding assignment:4 levels each with passing criteria. L1: Setup the data model Read the 2 JSON documents in src/main/java/resources/data, understand the data model. Edit the ShoppingList and ShoppingListItem classes in the codinpad.model package. Complete the ShoppingListRepositoryTests test and make it pass. L2: Bootstrap the DB with the 2 given JSON files. Edit DataConfig.java, bootstrap the DB using the 2 JSON files under src/main/java/resources/data Complete the DataConfigTests.testBootstrapDb and make it pass. L3: Surface data via REST API In the “API Request” window, try calling the following 3 APIs GET /shopping_lists GET /shopping_lists/1 GET /shopping_lists/1/items They should all give a 500 (not 404) error, which is expected, as we have not implemented the endpoints yet. Edit the ShoppingListResource.java and make the APIs work in the “API Request” window. Complete ShoppingListResourceTests test and make it pass. L4: Add dynamic info to data model Add a price field to the ShoppingListItem model, which is persisted in DB. When bootstrapping the DB, assign a positive price to all the items. Add a cost field to the ShoppingList model, which is NOT persisted in DB. When calling the getShoppingListDetail (GET /shopping_lists/{id}) endpoint, compute the cost field on-the-fly. But do not compute it in the getAllShoppingLists (GET /shopping_lists) endpoint. Update ShoppingListResourceTests to reflect this change
Sample data model: resources/data/file1 [ { "name": "Whey isolate protein powder", "unit": "Pound", "quantity": 5 }, { "name": "Chunk light tuna", "unit": null, "quantity": 12 }, { "name": "Rotisserie chicken", "unit": null, "quantity": 1 },...
Interview Questions (3)
You are given a graph of cities with name as integer, and an start city. At minute 0, an infection starts from the city with value start.
Each minute, a city becomes infected if:
The city is currently uninfected.The city is adjacent to an infected city.
Return the number of minutes needed for the entire tree to be infected.
graph = ["1->5", "1->3", "5->4", "4->9", "4->2", "3->10", "3->6"]
start = 3
output = 4
Write code to print dfs and bfs of a given graph. The node information will be user-defined (unlike the typical leetcode graphs where node values will be 0, 1, 2 and so on).
This was a 4-level coding assignment related to building a shopping list application.
L1: Setup the data model
Read the 2 JSON documents in src/main/java/resources/data, understand the data model. Edit the ShoppingList and ShoppingListItem classes in the codinpad.model package. Complete the ShoppingListRepositoryTests test and make it pass.
L2: Bootstrap the DB with the 2 given JSON files.
Edit DataConfig.java, bootstrap the DB using the 2 JSON files under src/main/java/resources/data. Complete the DataConfigTests.testBootstrapDb and make it pass.
L3: Surface data via REST API
In the “API Request” window, try calling the following 3 APIs GET /shopping_lists, GET /shopping_lists/1, GET /shopping_lists/1/items. They should all give a 500 (not 404) error, which is expected, as we have not implemented the endpoints yet. Edit the ShoppingListResource.java and make the APIs work in the “API Request” window. Complete ShoppingListResourceTests test and make it pass.
L4: Add dynamic info to data model
Add a price field to the ShoppingListItem model, which is persisted in DB. When bootstrapping the DB, assign a positive price to all the items. Add a cost field to the ShoppingList model, which is NOT persisted in DB. When calling the getShoppingListDetail (GET /shopping_lists/{id}) endpoint, compute the cost field on-the-fly. But do not compute it in the getAllShoppingLists (GET /shopping_lists) endpoint. Update ShoppingListResourceTests to reflect this change
Sample data model:
resources/data/file1 [ { "name": "Whey isolate protein powder", "unit": "Pound", "quantity": 5 }, { "name": "Chunk light tuna", "unit": null, "quantity": 12 }, { "name": "Rotisserie chicken", "unit": null, "quantity": 1 },...