Skip to content
InterviewEra
What is InterviewEraThe platform, founder, and missionHow It WorksAdaptive interview, live captions, scoringResume-aware ScoringCV-native questions + 5-dimension feedback
Campus Placements OverviewStructured mock interviews and cohort analytics for T&P teamsSet up Campus WorkspaceCreate your campus dashboard and invite your batchT&P Product & PricingPilot pricing, bulk onboarding, and placement trackingStudent Invitation HelpHow to accept a campus invite and start practising
Software EngineerDSA, system design, OOP roundsFrontend DeveloperReact, HTML/CSS, JavaScript interviewsTCS Interview QuestionsNQT + technical + HR roundsWipro Careers HubNLTH, WILP, Turbo hiring tracksSolera Careers HubCognitive assessment + Java/SQL roundsReact Interview QuestionsHooks, state, performance topics
Interview Question GeneratorRole-specific questions in secondsATS Resume CheckerScore your resume against job rolesSTAR Answer BuilderStructure behavioral answers clearly
All ResourcesCentral guide and hub directoryBlogInterview prep articles and guidesAgentic AI Interview GuideAI-assisted coding interviews, rubrics, and prepPlacement GuideStep-by-step campus prep playbookSTAR Method GuideMaster behavioral answers
Help CenterGuides, FAQs, and supportDSA Topic MapPatterns, roadmap, and top 50 problemsSoftware Engineer GuideSWE questions and prep hubAndroid GuideKotlin, Compose, MVVM prep hubFrontend GuideReact and JavaScript interviews
PricingFor Teams
Sign inSign up
InterviewEra

InterviewEra is an AI-powered mock interview platform with adaptive follow-ups, resume-aware scoring, and structured interview preparation for campus placements and early-career hiring.

Start Mock Interview

Mock Interview

  • How It Works
  • For Teams
  • Start Mock Interview
  • Campus Placements
  • Campus Workspace
  • Help Center

Free Tools

  • Interview Question Generator
  • ATS Resume Checker
  • STAR Answer Builder

Interview Questions

  • Wipro Careers Hub
  • Solera Careers Hub
  • Amazon SDE Questions
  • Microsoft SDE Questions
  • Infosys SWE Questions
  • Infosys Java Questions
  • Freshworks Frontend Questions
  • Android Developer Questions
  • Frontend Developer Questions
  • Java Developer Questions

Resources

  • Community Hub
  • All Resources
  • Blog
  • Agentic AI Interview Guide
  • What Is Agentic AI
  • Agentic Coding Round
  • AI Prompt Engineering
  • Cursor AI Interview Guide
  • DSA Topic Map
  • Placement Guide
  • STAR Guide
  • HR Guide
  • Interview Tips

Company

  • What is InterviewEra
  • About Us
  • Pricing
  • Contact

© 2026 InterviewEra. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›Topics›Data Structures

CS Fundamentals · Fresher-relevant

Data Structures Interview Questions 2026

Data structures interview questions on arrays, linked lists, trees, graphs, stacks, and queues — mandatory for every engineering role at Indian tech companies.

CS FundamentalsFresher-relevant

Data Structures Interview Questions

Placement-oriented · Updated 2026
  1. 01

    When would you use an array vs a linked list?

    TechnicalEasy

    Tip: Arrays give O(1) random access and cache-friendly contiguous memory but O(n) insertion/deletion in the middle. Linked lists give O(1) insert/delete given a node but O(n) access and poor cache locality. Use arrays for indexing-heavy work, linked lists for frequent middle insertions.

  2. 02

    How does a hash table work and how are collisions handled?

    TechnicalMedium

    Tip: A hash function maps keys to bucket indices for average O(1) lookup. Collisions are resolved by chaining (linked list/tree per bucket) or open addressing (linear/quadratic probing). Load factor triggers resizing/rehashing. Worst case degrades to O(n) with poor hashing.

  3. 03

    What is the difference between a stack and a queue?

    TechnicalEasy

    Tip: A stack is LIFO (push/pop at one end) — used for function calls, undo, and DFS. A queue is FIFO (enqueue rear, dequeue front) — used for scheduling and BFS. Both support O(1) insert/remove.

  4. 04

    Compare BFS and DFS on a graph.

    TechnicalMedium

    Tip: BFS uses a queue, explores level by level, and finds shortest paths in unweighted graphs; memory grows with the frontier width. DFS uses a stack/recursion, goes deep first, uses less memory on wide graphs, and suits cycle detection and topological sort. Both are O(V+E).

  5. 05

    What is a binary search tree and when does it degrade?

    TechnicalMedium

    Tip: A BST keeps left < node < right, giving O(log n) search/insert when balanced. Inserting sorted data degrades it into a linked list (O(n)). Self-balancing trees (AVL, Red-Black) keep height logarithmic by rotating on insert/delete.

  6. 06

    What is a heap and what is it used for?

    TechnicalMedium

    Tip: A binary heap is a complete tree where each parent is ≤ (min-heap) or ≥ (max-heap) its children, stored in an array. It gives O(1) peek and O(log n) insert/extract — used for priority queues, Dijkstra, and finding the top-K elements.

  7. 07

    What is a trie and when is it the right choice?

    TechnicalMedium

    Tip: A trie (prefix tree) stores strings by shared prefixes, giving O(L) lookup/insert where L is word length, independent of the number of words. Ideal for autocomplete, prefix search, and dictionary/spell-check — at the cost of higher memory.

  8. 08

    How do you detect a cycle in a linked list?

    TechnicalMedium

    Tip: Floyd's cycle detection (tortoise and hare): advance one pointer by 1 and another by 2; if they meet, there is a cycle. It uses O(1) extra space vs a hash set's O(n). To find the cycle start, reset one pointer to head and advance both by 1.

Practice DS questions with your own resume

InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.

Start free mock interviewFree question generator

Roles that need DS

  • Software Engineer questions
  • Java Developer questions
  • Python Developer questions
  • Backend Developer questions
  • Machine Learning Engineer questions

Related cs-fundamentals topics

  • Algorithms questions
  • System Design questions
  • Object-Oriented Programming questions
  • Database Management Systems questions
  • Operating Systems questions

Practice tools

  • Interview question generator
  • ATS resume checker
  • STAR answer builder

Guides and resources

  • All interview questions
  • HR interview answer tips
  • STAR method with examples