Veda Bites are swipeable micro-lessons — each one teaches exactly one
idea. The bites below come from this kit — swipe through them in the app.
💡 Key Idea
Data Structures Are Classified in Two Ways
Two lenses classify every data structure.
Every data structure can be classified along two independent axes — by whether it is built into the language, and by how its elements are arranged.
↳ Classification answers two questions: is it built-in, and how are its elements arranged?
📖 Definition
Primitive Data Structures: The Building Blocks
The raw bricks of every program.
↳ Primitive structures are the language's built-in single-value types — the raw materials for everything else.
📖 Definition
Non-Primitive Data Structures: Built From Primitives
Complex structures grown from simple types.
↳ Non-primitive structures are user-defined groupings built on top of primitive types.
⚖️ Comparison
Primitive vs Non-Primitive: Side by Side
Built-in or built-up? Know the difference.
↳ Primitive types store one value; non-primitive types organize many values into a structure.
💡 Key Idea
Linear vs Non-Linear: How Elements Are Arranged
One line, or many branches?
Non-primitive data structures split further by how their elements are arranged — in a single sequence, or in a hierarchy.
↳ Linear structures are sequential; non-linear structures are hierarchical.
✏️ Example
Spotting the Category in Real Code
Name the type in one glance.
↳ A single built-in variable is primitive; a collection like an array is non-primitive and linear.
💡 Key Idea
Full Classification Map at a Glance
One table, the whole classification.
↳ Primitive has no sub-types; non-primitive splits into linear and non-linear.
⭐ Important Fact
Non-Primitive Splits Into Two Groups
Non-primitive isn't the end of the story.
↳ The linear/non-linear split applies only to non-primitive structures, not to primitive ones.
⚠️ Common Mistake
Don't Call an Array Primitive
Arrays are not primitive — here's why.
↳ If it holds multiple values or is derived from basic types, it is non-primitive.
⚙️ Process
How to Classify Any Data Structure
Three questions, instant classification.
↳ Classify in order: primitive first, then linear vs non-linear for non-primitive.
🌍 Real World
Where Each Type Shows Up in Real Systems
From undo buttons to maps.
↳ Choosing the right structure — linear or non-linear — decides how efficiently a real system runs.
🧠 Memory Trick
Remember the Split With 'P-N-L-N'
Four letters, full classification.
Recall the hierarchy as P → N → L → N: Primitive, then Non-primitive, which splits into Linear and Non-linear.
↳ P-N-L-N chains the entire classification in order.
🎯 Exam Tip
Exam Favourite: Give Examples With Each Category
Examiners want examples, not just names.
↳ Category + example + linear/non-linear label = full marks.
❓ Did You Know
Primitive Types Differ Across Languages
Same idea, different names.
The set of primitive types is not identical in every language — for example, some languages treat strings as primitive while others treat them as non-primitive. The classification idea stays the same, but the exact list can vary.
↳ The primitive/non-primitive concept is universal, but the exact primitive list is language-dependent.
💡 Prerequisite
What You Need Before Going Deeper
Lock these basics first.
↳ Knowing variables, data types, and memory makes classification click instantly.