CARMA Corp. interview question

2 Coding questions on simple iterations and 2 database query questions