Bird
Raised Fist0
HLDsystem_design~20 mins

Data privacy and compliance (GDPR) in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
GDPR Compliance Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding GDPR Data Subject Rights

Which of the following is NOT a right granted to data subjects under GDPR?

ARight to demand unlimited data sharing with third parties
BRight to have personal data erased (right to be forgotten)
CRight to access personal data held by an organization
DRight to data portability to another service provider
Attempts:
2 left
💡 Hint

Think about what GDPR protects regarding personal data sharing.

❓ Architecture
intermediate
2:00remaining
Designing a GDPR-Compliant Data Deletion Flow

You need to design a system flow for handling user requests to delete their personal data under GDPR. Which step should NOT be part of the flow?

AImmediately delete all data without any backup or logs
BLog the deletion request and action for audit purposes
CVerify the identity of the requester before processing deletion
DNotify the user once deletion is complete
Attempts:
2 left
💡 Hint

Consider GDPR requirements for accountability and audit trails.

❓ scaling
advanced
2:30remaining
Scaling Data Access Requests in a Multi-Region System

Your global service receives thousands of GDPR data access requests daily from users in different regions. Which architectural approach best supports scalable, compliant handling of these requests?

ACentralize all personal data in one region and process all requests there
BProcess requests manually via email to ensure accuracy
CIgnore regional data residency and process requests in any data center
DDistribute data regionally and process requests locally with synchronized audit logs
Attempts:
2 left
💡 Hint

Think about data residency laws and system scalability.

❓ tradeoff
advanced
2:30remaining
Tradeoffs in Data Encryption for GDPR Compliance

When implementing encryption for personal data to comply with GDPR, which tradeoff is most important to consider?

ANot encrypting data to improve system performance
BEncrypting all data at rest and in transit may increase latency and cost
CEncrypting only non-personal data to save resources
DUsing weak encryption algorithms to reduce complexity
Attempts:
2 left
💡 Hint

GDPR requires protection of personal data but also consider system impact.

❓ estimation
expert
3:00remaining
Estimating Storage Needs for GDPR Data Retention

Your system stores personal data for 5 years to comply with GDPR retention policies. If you have 1 million users, each generating 10 KB of personal data monthly, estimate the total storage needed for personal data retention.

A50 TB
B5 TB
C600 GB
D600 TB
Attempts:
2 left
💡 Hint

Calculate monthly data per user, multiply by users and months in 5 years, then convert to TB.

Practice

(1/5)
1. What is the main purpose of GDPR in system design?
easy
A. To reduce server costs by deleting all user data immediately
B. To protect user privacy and ensure data is handled responsibly
C. To allow unlimited data collection for marketing
D. To increase system performance by caching user data

Solution

  1. Step 1: Understand GDPR's goal

    GDPR aims to protect personal data and privacy of users in the EU.
  2. Step 2: Match purpose to options

    Only To protect user privacy and ensure data is handled responsibly mentions protecting privacy and responsible data handling, which aligns with GDPR.
  3. Final Answer:

    To protect user privacy and ensure data is handled responsibly -> Option B
  4. Quick Check:

    GDPR = Protect privacy [OK]
Hint: GDPR = user privacy protection [OK]
Common Mistakes:
  • Confusing GDPR with performance or cost goals
  • Thinking GDPR allows unlimited data collection
  • Ignoring privacy as the core focus
2. Which of the following is a correct way to obtain user consent under GDPR?
easy
A. Collecting data first, then asking for consent later
B. Pre-checked boxes that users can uncheck anytime
C. Assuming consent if the user visits the website
D. Clear opt-in with explicit user action before data collection

Solution

  1. Step 1: Review GDPR consent rules

    Consent must be freely given, specific, informed, and unambiguous with clear user action.
  2. Step 2: Evaluate options

    Only Clear opt-in with explicit user action before data collection describes explicit opt-in before data collection, which is GDPR compliant.
  3. Final Answer:

    Clear opt-in with explicit user action before data collection -> Option D
  4. Quick Check:

    Consent = explicit opt-in [OK]
Hint: Consent requires clear opt-in, not assumptions [OK]
Common Mistakes:
  • Using pre-checked boxes as valid consent
  • Assuming visiting equals consent
  • Collecting data before consent
3. Consider a system that stores user data with a 'right to be forgotten' feature. Which action correctly implements this under GDPR?
def delete_user_data(user_id):
    # Step 1: Mark user data as deleted
    database.mark_deleted(user_id)
    # Step 2: Remove data from active systems
    cache.remove(user_id)
    # Step 3: Permanently erase data after retention period
    schedule_permanent_delete(user_id, days=30)
medium
A. This implementation violates GDPR because data is not deleted immediately
B. This implementation is incorrect because it does not notify the user
C. This implementation respects GDPR by delaying permanent deletion for 30 days
D. This implementation is incorrect because it does not encrypt user data

Solution

  1. Step 1: Understand GDPR's 'right to be forgotten'

    GDPR allows data to be deleted but permits a retention period for legal or operational reasons.
  2. Step 2: Analyze code steps

    Data is marked deleted, removed from active use, and scheduled for permanent erase after 30 days, which is acceptable.
  3. Final Answer:

    This implementation respects GDPR by delaying permanent deletion for 30 days -> Option C
  4. Quick Check:

    Right to be forgotten allows retention delay [OK]
Hint: Deletion can be delayed for legal retention [OK]
Common Mistakes:
  • Expecting immediate permanent deletion always
  • Confusing notification with deletion requirements
  • Thinking encryption replaces deletion
4. A system logs user IP addresses without anonymization. Which GDPR compliance issue does this cause?
log_user_access(user_id, ip_address):
    logs.save({'user': user_id, 'ip': ip_address, 'time': now()})
medium
A. It violates data minimization by storing unnecessary personal data
B. It violates consent because IP addresses are not encrypted
C. It violates breach notification rules by logging IPs
D. It violates data portability by not exporting IP addresses

Solution

  1. Step 1: Identify GDPR principles involved

    Data minimization requires only collecting data necessary for the purpose.
  2. Step 2: Analyze IP logging

    Storing full IP addresses without anonymization may be unnecessary and excessive, violating minimization.
  3. Final Answer:

    It violates data minimization by storing unnecessary personal data -> Option A
  4. Quick Check:

    Data minimization = minimal necessary data [OK]
Hint: Store only data you really need [OK]
Common Mistakes:
  • Confusing encryption with consent
  • Mixing breach notification with logging
  • Thinking data portability applies here
5. You are designing a system to comply with GDPR. Which combination of features best supports compliance?
  • 1. Data encryption at rest and in transit
  • 2. User consent management with audit logs
  • 3. Automatic data deletion after user request
  • 4. Collecting all user data for analytics without opt-out
hard
A. Features 1, 2, and 3 only
B. Features 2 and 4 only
C. Features 1 and 4 only
D. All features 1, 2, 3, and 4

Solution

  1. Step 1: Evaluate each feature for GDPR compliance

    Feature 1 (encryption) protects data; Feature 2 manages consent properly; Feature 3 respects user deletion rights; Feature 4 violates consent and data minimization.
  2. Step 2: Select compliant combination

    Only features 1, 2, and 3 together support GDPR compliance fully.
  3. Final Answer:

    Features 1, 2, and 3 only -> Option A
  4. Quick Check:

    Consent + encryption + deletion = GDPR compliance [OK]
Hint: Exclude features violating consent or data minimization [OK]
Common Mistakes:
  • Including data collection without opt-out
  • Ignoring encryption importance
  • Overlooking user deletion rights
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard