← All CodeSignal Technical Assessment Flashcard Decks

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
  1. Which sorting algorithm has the best worst-case time complexity?

    Answer: Merge Sort

    Merge Sort guarantees O(n log n) in all cases, whereas Quick Sort degrades to O(n²) on already-sorted input with a naive pivot.

  2. In a relational database, what is a foreign key constraint used for?

    Answer: Enforcing referential integrity between two tables

    A foreign key ensures that every value in the child column exists as a primary key in the parent table, preventing orphaned records.

  3. What does the CAP theorem state about distributed systems?

    Answer: In the presence of a network partition, a system must trade off between Consistency and Availability

    CAP theorem proves that when a partition occurs, a distributed system must choose to either remain consistent (reject some requests) or available (return possibly stale data).

  4. Which concurrency primitive in Python's threading module is used to limit simultaneous access to a shared resource to a fixed number of threads?

    Answer: Semaphore

    A Semaphore maintains an internal counter and blocks threads once the counter reaches zero, allowing N concurrent accesses rather than just 1.

  5. In CSS, which property controls the order in which flex items appear visually without changing the DOM order?

    Answer: order

    The CSS `order` property lets you reposition flex (or grid) items visually while their source order in the DOM remains unchanged.

  6. What is a 'deadlock' in concurrent programming?

    Answer: Two or more threads permanently blocked, each waiting for a resource held by another

    Deadlock requires mutual exclusion, hold-and-wait, no preemption, and circular wait — all four conditions must hold simultaneously.

  7. In computer networks, what is the purpose of NAT (Network Address Translation)?

    Answer: Mapping private IP addresses to one or more public IPs to conserve address space

    NAT allows many devices with private (RFC 1918) addresses to share a single public IP by rewriting source/destination IP and port fields.