DSA Interview Question

What is a data structure?

Updated 2026-07-10 · Beginner friendly
Quick answer

A data structure is a way of organising and storing data in memory so it can be used efficiently. Different structures are good at different jobs. An array is great for fast lookups by position, a linked list is great for frequent inserts, and a hash table is great for fast lookups by key. Choosing the right one is the difference between fast and slow code.

The core idea

Data by itself is just a pile of values. A data structure gives that data a shape so your program can find, add, and remove items quickly. Think of it like the difference between a messy drawer and a labelled filing cabinet.

Common examples

In the interview

Interviewers care less about the definition and more about whether you can pick the right structure for a problem. Practice saying which structure you would use and why, for example a hash map for counting frequencies.

Want the full DSA guide?

Read every DSA concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the DSA guide All DSA questions