Domain-Specific Knowledges Flashcards
7 cards from real CodeSignal Technical Assessment practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Domain-Specific Knowledges flashcards as text
In a REST API, which HTTP status code indicates that the client's request was syntactically correct but semantically invalid (e.g., a business rule violation)?
Answer: 422 Unprocessable Entity
422 Unprocessable Entity is used when the request is well-formed but contains semantic errors that prevent processing.
Which SQL isolation level prevents dirty reads but still allows non-repeatable reads?
Answer: Read Committed
Read Committed prevents reading uncommitted (dirty) data but allows another transaction to modify rows between two reads in the same transaction.
In object-oriented design, the Liskov Substitution Principle states that:
Answer: Objects of a superclass should be replaceable with objects of its subclasses without breaking correctness
LSP requires that subclasses honor the behavioral contracts of their parent classes so callers can rely on polymorphism safely.
Which data structure offers O(1) average-case insertion and lookup but O(n) worst-case due to hash collisions?
Answer: Hash Table
Hash tables achieve O(1) average operations but degrade to O(n) when all keys hash to the same bucket.
In Git, what does a 'detached HEAD' state mean?
Answer: The HEAD pointer references a specific commit rather than a branch
Detached HEAD means HEAD points directly to a commit SHA instead of a named branch ref, so new commits won't belong to any branch.
Which Big-O complexity describes inserting an element at the beginning of a singly linked list?
Answer: O(1)
Inserting at the head of a singly linked list requires only updating the head pointer and the new node's next pointer, both constant-time operations.
In a microservices architecture, the Saga pattern is primarily used to:
Answer: Manage distributed transactions across multiple services without two-phase commit
The Saga pattern coordinates a sequence of local transactions across services, using compensating transactions to undo changes on failure.