Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
For the C++ solution, instead of pair of pairs we could use std::tuple to create...

Athanasios Petsas

Mar 3, 2022

For the C++ solution, instead of pair of pairs we could use std::tuple to create a triplet, to make it more clear:

std::tuple triplet;

or a struct:

struct triplet { int val, array_idx, elem_idx; };

0

0

Comments
Comments

On this page