BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 14 Question 29 Discussion

Posted by Devora on May 06, 2022 at 05:53 PM

You are parsing a log file that contains three columns: a timestamp, an account number (a string), and a

transaction amount (a number). You want to calculate the sum of all transaction amounts for each unique account number efficiently.

Which data structure should you use?

Suggested Answer: B

Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
12 comments · newest first
JE
Jesusa 1 year ago
Not sure about the hash table, what if there are too many collisions?
LY
Lyda 1 year ago
Wait, can a comma-delimited string even handle this?
LO
Lottie 1 year ago
A linked list? That sounds slow for this task.
LE
Leonard 1 year ago
I agree, hash tables are super efficient for unique keys.
AN
Annice 1 year ago
A hash table is definitely the way to go for this!
SA
Salena 1 year ago
A two-dimensional array seems too complicated for this; I guess a hash table would be simpler, but I'm not completely confident.
LE
Leah 1 year ago
I'm not entirely sure, but I remember something about linked lists being inefficient for this kind of task.
HU
Huey 1 year ago
I think a hash table might be the best choice since it allows for quick lookups and can handle unique keys well.
FR
Francoise 1 year ago
I practiced a similar question, and I feel like a hash table is definitely the way to go for summing amounts by account number.
LU
Lura 1 year ago
Hmm, I'm a bit unsure about this one. Monitoring every keystroke seems a bit extreme, but I'm not sure if that's the best approach. I'll have to think this through carefully.
ER
Erasmo 1 year ago
Availability might also be a good option, to make sure the selected products are actually in stock and available for purchase.
AP
Apolonia 1 year ago
Okay, I think I've got a strategy here. The key is to focus on the error message about the solution checker not being able to export the solution. That's the main clue we have to work with.
0/2000 characters

Save Cancel