XOR-based random number generator used to encrypt and decrypt a tree document
Company: Baseten
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: A two-part coding exercise: implement a pseudo-random number generator built from bit shifts and XOR, then use it as a keystream to encrypt and decrypt a tree-structured document so the original tree is restored exactly. It tests fixed-width bit manipulation, seeding, unambiguous serialization, and awareness of the security limits of hand-made ciphers.
Read the full Baseten Software Engineer interview experience this question came from