Skip to content

Naheed - Rideshare - Edges#24

Open
arangn wants to merge 1 commit into
Ada-C10:masterfrom
arangn:master
Open

Naheed - Rideshare - Edges#24
arangn wants to merge 1 commit into
Ada-C10:masterfrom
arangn:master

Conversation

@arangn

@arangn arangn commented Aug 13, 2018

Copy link
Copy Markdown

ride share

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What did your data structure look like at first? Did this structure evolve over time? Why? At first I started with all my data in a single array containing a hash for driver ID as the key, and an array of hashes containing all the driver info within it. However, I was having trouble accessing the data so I removed the outermost array, and simplified it down to one hash with the driver ID as a key, etc
What was your strategy for going through the data structure and gathering information? I initially had lots of trouble accessing the information because I was trying to pass my hash key through my array, and kept getting an error. Once I realized I could just iterate over my outermost hash, it was a lot easier.
What was an example of something that was necessary to store in a variable? What was the scope of each of that variables? Why? The max profit and max ratings needed to be stored in a variable to be accessed outside of the scope in which they were calculated
What kinds of iteration did you use? Did you use .map? I mainly used .each to iterate through my array. I tried using .map to find the max profit and rating instead of .max_by but couldn't quite figure it out
Were some calculations easier than others? Why? Yes- the max profit and max rating were the most difficult because I kept making mistakes on my scope and was having trouble figuring out how to put it in a hash and access it.

@droberts-sea

Copy link
Copy Markdown

Great work overall! I like your choice of data structure - it feels like a very natural way to represent this data. I also appreciate the way you've used methods to break up and label your code. Keep up the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants