← Jump Trading Interview Insights

Jump Trading·Software Engineer·Onsite - Coding / Algorithms·Intermediate

Intermediate
May 2026

Summary

Coding round at Jump Trading for a software engineering role. One problem, file permissions, filtering for read-only files from a batch of queries. Pretty focused and not too long.

Questions Asked (1)

Q1

You're given a list of file access queries, each containing an owner, a permission type, and a filename. Which files are read-only, meaning no query ever grants write or any other non-read permission to them?

Algorithms & Data Structures
Author's notes

Basically a grouping problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem as finding files that never appear with a non-read permission. Use a hash set to track files with non-read permissions, then iterate through the queries to populate it, and finally identify files that are only ever read (or never appear with write/execute).

Pro tip: Clarify edge cases upfront: what if a file appears only with read permissions? What if a file never appears? Also, consider if permissions are case-sensitive or if there are other permission types like execute.

1. Clarify requirements and edge cases

Ask if 'read-only' means the file has at least one read query and no non-read queries, or if files with no queries are considered read-only. Also confirm permission types (e.g., read, write, execute) and case sensitivity.

2. Choose data structures

Use a hash set to store filenames that have any non-read permission. Optionally, use another set to track all filenames that appear with read permission.

3. Process queries

Iterate through each query. If the permission is not 'read', add the filename to the non-read set. If it is 'read', optionally add to a read set.

4. Determine read-only files

The read-only files are those that are not in the non-read set. If you tracked read files, you might intersect with the read set to ensure they have at least one read permission.

5. Return result

Return the list of filenames that are read-only. Discuss time and space complexity: O(n) time and O(n) space where n is number of queries.

Key Points to Mention

  • Hash set for efficient O(1) lookups and insertions.
  • Time complexity: O(n) where n is number of queries.
  • Space complexity: O(m) where m is number of unique filenames.
  • Edge case: files with no queries might be considered read-only or not, depending on definition.
  • Permission types: read, write, execute; only 'read' is considered read-only.
  • Alternative: sort queries and use two pointers, but hash set is simpler.

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