Infosys interview question

Data Structure details and stack and queue

Interview Answer

Anonymous

28 Nov 2024

Common Types of Data Structures: Arrays: A collection of elements, identified by index or key. Linked Lists: A linear collection of elements (nodes) where each node points to the next. Stacks: A linear data structure that follows the Last In, First Out (LIFO) principle. Queues: A linear data structure that follows the First In, First Out (FIFO) principle. Trees: A hierarchical data structure where each node has a value and can have multiple children. Graphs: A collection of nodes (vertices) connected by edges. Hash Tables: A collection of key-value pairs, optimized for fast lookups.