Cohere Coding Interview Questions
25 Cohere coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Cohere interviewer values, and a FAQ section.
Showing 2 problems of 25
- #23hardfrequently asked
23. Merge K Sorted Lists
Merge k sorted linked lists into one sorted list. Cohere asks this because k-way merge is the core algorithm for combining ranked results from multiple retrieval shards in a distributed RAG system — minimising latency while maintaining global ordering.
- #42hardfrequently asked
42. Trapping Rain Water
Calculate how much water can be trapped between bars after rain. Cohere asks this because the two-pointer insight — maintaining running maxima from both ends — mirrors how bidirectional attention masks are constructed in transformer architectures.