← Valon Interview Insights

Valon·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Valon SWE interview had me building an in-memory database from scratch, DynamoDB-style schema and all. No LeetCode judge, you write your own tests, which sounds freeing until you realize you have no safety net.

Questions Asked (2)

Q1

Design and implement an in-memory database with a flexible schema, where each row is a set of key-value pairs and different rows can have different columns. Implement insert, find_by_column, and find_by_column_value operations.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

The flexible schema part tripped me up more than the code itself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a data model using a primary key to row map and secondary indexes for efficient lookups. Implement the operations with appropriate data structures, and discuss trade-offs in time and space complexity.

Pro tip: Mention that you would use a hash map for the primary key index and inverted indexes for column lookups, and discuss how to handle updates and deletes to keep indexes consistent.

1. Clarify Requirements

Ask about expected data volume, read/write ratio, concurrency needs, and whether columns are known in advance. This shows you think about practical constraints.

2. Design Data Model

Propose storing each row as a dictionary of column-value pairs, with a unique row ID. Use a primary index (hash map) for row ID to row data, and secondary indexes (inverted indexes) for column names and column values.

3. Implement Operations

For insert, add the row to the primary index and update secondary indexes. For find_by_column, return all rows containing that column. For find_by_column_value, return rows where the column equals the value.

4. Analyze Complexity

Discuss time and space complexity: insert O(1) amortized, find_by_column O(1) to get the index then O(k) to return rows, find_by_column_value O(1) to get the index then O(m) to return matching rows.

5. Discuss Trade-offs and Extensions

Mention trade-offs like memory overhead of indexes, handling updates/deletes, concurrency, and possible extensions like range queries or persistence.

Key Points to Mention

  • Use of hash maps for primary and secondary indexes
  • Inverted index for efficient column and value lookups
  • Handling of dynamic schema (rows with different columns)
  • Time and space complexity analysis
  • Strategies for updates and deletes to maintain index consistency
  • Potential concurrency and scalability considerations

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Extend the query API to support filtering by multiple column predicates simultaneously, like filter({col1: v1, col2: v2}) returning rows that match all conditions. Discuss the data structures, index design, tradeoffs between insert cost and query cost, and how you'd handle range queries or missing columns.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where it got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a data structure that supports efficient multi-predicate filtering, such as a composite index or bitmap index. Discuss the tradeoffs between insert and query costs, and how to extend the design to handle range queries and missing columns.

Pro tip: Mention that the optimal index depends on query patterns and data distribution; a one-size-fits-all solution doesn't exist, so you'd instrument and iterate based on real usage.

1. Clarify requirements and constraints

Ask about expected query patterns, data volume, update frequency, and whether predicates are equality-only or include ranges. This shapes the index design.

2. Propose core data structures

Suggest a composite index (e.g., B-tree on (col1, col2)) for equality queries, or a bitmap index for low-cardinality columns. For more flexibility, consider inverted indexes or a columnar store.

3. Analyze tradeoffs

Compare insert cost (maintaining multiple indexes) vs query cost (scan vs index lookup). Discuss write amplification, storage overhead, and query latency.

4. Extend to range queries and missing columns

For range queries, use a B-tree or skip list; for missing columns, consider sparse indexes or default values. Discuss how to combine indexes (intersection) or use a query planner.

5. Summarize and recommend

Recommend a design based on the clarified requirements, and mention monitoring and iterative improvement.

Key Points to Mention

  • Composite indexes and their column order importance
  • Bitmap indexes for low-cardinality columns and fast bitwise operations
  • Tradeoff between insert cost (index maintenance) and query cost (index lookup vs full scan)
  • Handling range queries with B-trees or ordered indexes
  • Strategies for missing columns: sparse indexes, default values, or null handling
  • Query optimization: index intersection, covering indexes, and query planning

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.