InterviewStack.io LogoInterviewStack.io

Basic Data Structures (Objects, Maps, Sets) Questions

Understand how objects work in JavaScript including prototypal inheritance and property descriptors. Know when to use Maps vs Objects and Sets vs Arrays. Understand the performance characteristics of different data structures. Be comfortable with nested data structures and how to manipulate them efficiently.

MediumTechnical
0 practiced
In an AI feature store, you must map tokens to embedding vectors. Explain trade-offs between storing embeddings in a Map keyed by token string, a plain Object, or packing vectors into typed binary buffers with an index mapping. Discuss memory layout, lookup speed, GC pressure, and serialization concerns.
EasyTechnical
0 practiced
Explain the differences between JavaScript Objects and Maps. Cover allowed key types, iteration and insertion order, how to get size, prototype behavior, typical memory and performance trade-offs, and when you'd prefer Map over Object in a real AI preprocessing task such as counting token frequencies.
EasyTechnical
0 practiced
Explain WeakMap and WeakSet in JavaScript. Discuss their garbage collection semantics compared to Map/Set, why they are not enumerable, typical use cases for per-object caches in long-lived AI services, and limitations such as inability to get size.
EasyTechnical
0 practiced
Explain JavaScript property descriptors: data descriptor attributes (value, writable, enumerable, configurable) and accessor descriptors (get/set). Show how you would make an object's property effectively read-only while still allowing other properties to be added elsewhere.
EasyTechnical
0 practiced
Describe differences between Object.freeze(obj) and Object.seal(obj) in JavaScript. Explain effects on existing properties, adding/removing properties, and whether nested objects are affected. When would you apply each to a model configuration object?

Unlock Full Question Bank

Get access to hundreds of Basic Data Structures (Objects, Maps, Sets) interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.