UNPKG

cli-prep

Version:

A fun and interactive command-line interview preparation game to test your programming knowledge with 80+ questions across multiple categories!

917 lines (900 loc) 37.6 kB
// Questions database with over 100 DSA, JavaScript, and programming questions export const questionBank = [ // Data Structures & Algorithms { question: 'What is the time complexity of a binary search algorithm?', choices: [ { name: 'O(n)', value: 'O(n)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(n^2)', value: 'O(n^2)' }, { name: 'O(1)', value: 'O(1)' } ], correctAnswer: 'O(log n)', category: 'Algorithms' }, { question: 'Which data structure uses LIFO (Last In, First Out) principle?', choices: [ { name: 'Queue', value: 'Queue' }, { name: 'Stack', value: 'Stack' }, { name: 'Array', value: 'Array' }, { name: 'Linked List', value: 'Linked List' } ], correctAnswer: 'Stack', category: 'Data Structures' }, { question: 'What is the worst-case time complexity of QuickSort?', choices: [ { name: 'O(n log n)', value: 'O(n log n)' }, { name: 'O(n^2)', value: 'O(n^2)' }, { name: 'O(n)', value: 'O(n)' }, { name: 'O(log n)', value: 'O(log n)' } ], correctAnswer: 'O(n^2)', category: 'Algorithms' }, { question: 'What does BFS stand for in graph algorithms?', choices: [ { name: 'Binary First Search', value: 'Binary First Search' }, { name: 'Breadth First Search', value: 'Breadth First Search' }, { name: 'Best First Search', value: 'Best First Search' }, { name: 'Branch First Search', value: 'Branch First Search' } ], correctAnswer: 'Breadth First Search', category: 'Algorithms' }, { question: 'Which traversal visits the root node first?', choices: [ { name: 'Inorder', value: 'Inorder' }, { name: 'Preorder', value: 'Preorder' }, { name: 'Postorder', value: 'Postorder' }, { name: 'Level order', value: 'Level order' } ], correctAnswer: 'Preorder', category: 'Trees' }, { question: 'What is the space complexity of merge sort?', choices: [ { name: 'O(1)', value: 'O(1)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(n)', value: 'O(n)' }, { name: 'O(n^2)', value: 'O(n^2)' } ], correctAnswer: 'O(n)', category: 'Algorithms' }, { question: 'Which data structure is used for implementing recursion?', choices: [ { name: 'Queue', value: 'Queue' }, { name: 'Stack', value: 'Stack' }, { name: 'Array', value: 'Array' }, { name: 'Hash Table', value: 'Hash Table' } ], correctAnswer: 'Stack', category: 'Data Structures' }, { question: 'What is the average time complexity of hash table operations?', choices: [ { name: 'O(1)', value: 'O(1)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(n)', value: 'O(n)' }, { name: 'O(n log n)', value: 'O(n log n)' } ], correctAnswer: 'O(1)', category: 'Data Structures' }, { question: 'Which algorithm is used to find the shortest path in a weighted graph?', choices: [ { name: 'BFS', value: 'BFS' }, { name: 'DFS', value: 'DFS' }, { name: 'Dijkstra', value: 'Dijkstra' }, { name: 'Kruskal', value: 'Kruskal' } ], correctAnswer: 'Dijkstra', category: 'Graphs' }, { question: 'What is the minimum number of nodes in a complete binary tree of height h?', choices: [ { name: '2^h', value: '2^h' }, { name: '2^h - 1', value: '2^h - 1' }, { name: '2^(h+1) - 1', value: '2^(h+1) - 1' }, { name: '2^(h-1)', value: '2^(h-1)' } ], correctAnswer: '2^h', category: 'Trees' }, // JavaScript Questions { question: 'Which of the following is NOT a valid JavaScript data type?', choices: [ { name: 'undefined', value: 'undefined' }, { name: 'boolean', value: 'boolean' }, { name: 'float', value: 'float' }, { name: 'symbol', value: 'symbol' } ], correctAnswer: 'float', category: 'JavaScript' }, { question: 'What is the output of: typeof null?', choices: [ { name: 'null', value: 'null' }, { name: 'object', value: 'object' }, { name: 'undefined', value: 'undefined' }, { name: 'boolean', value: 'boolean' } ], correctAnswer: 'object', category: 'JavaScript' }, { question: 'Which method is used to add elements to the end of an array?', choices: [ { name: 'push()', value: 'push()' }, { name: 'pop()', value: 'pop()' }, { name: 'shift()', value: 'shift()' }, { name: 'unshift()', value: 'unshift()' } ], correctAnswer: 'push()', category: 'JavaScript' }, { question: 'What does the "this" keyword refer to in JavaScript?', choices: [ { name: 'The global object', value: 'The global object' }, { name: 'The current function', value: 'The current function' }, { name: 'The context in which it is called', value: 'The context in which it is called' }, { name: 'The parent object', value: 'The parent object' } ], correctAnswer: 'The context in which it is called', category: 'JavaScript' }, { question: 'Which of the following creates a closure in JavaScript?', choices: [ { name: 'A function returning another function', value: 'A function returning another function' }, { name: 'A loop inside a function', value: 'A loop inside a function' }, { name: 'An object literal', value: 'An object literal' }, { name: 'A class declaration', value: 'A class declaration' } ], correctAnswer: 'A function returning another function', category: 'JavaScript' }, { question: 'What is the difference between == and === in JavaScript?', choices: [ { name: '== checks type, === checks value', value: '== checks type, === checks value' }, { name: '== checks value, === checks type and value', value: '== checks value, === checks type and value' }, { name: 'No difference', value: 'No difference' }, { name: '=== is deprecated', value: '=== is deprecated' } ], correctAnswer: '== checks value, === checks type and value', category: 'JavaScript' }, { question: 'Which method is used to remove the last element from an array?', choices: [ { name: 'pop()', value: 'pop()' }, { name: 'push()', value: 'push()' }, { name: 'shift()', value: 'shift()' }, { name: 'slice()', value: 'slice()' } ], correctAnswer: 'pop()', category: 'JavaScript' }, { question: 'What is hoisting in JavaScript?', choices: [ { name: 'Moving functions to the top', value: 'Moving functions to the top' }, { name: 'Variable and function declarations are moved to the top of their scope', value: 'Variable and function declarations are moved to the top of their scope' }, { name: 'Creating objects', value: 'Creating objects' }, { name: 'Error handling', value: 'Error handling' } ], correctAnswer: 'Variable and function declarations are moved to the top of their scope', category: 'JavaScript' }, { question: 'Which keyword is used to create a constant in JavaScript?', choices: [ { name: 'var', value: 'var' }, { name: 'let', value: 'let' }, { name: 'const', value: 'const' }, { name: 'final', value: 'final' } ], correctAnswer: 'const', category: 'JavaScript' }, { question: 'What is the purpose of the bind() method?', choices: [ { name: 'To create a new array', value: 'To create a new array' }, { name: 'To bind a function to a specific context', value: 'To bind a function to a specific context' }, { name: 'To combine two objects', value: 'To combine two objects' }, { name: 'To validate data', value: 'To validate data' } ], correctAnswer: 'To bind a function to a specific context', category: 'JavaScript' }, // Programming Concepts { question: 'What is polymorphism in object-oriented programming?', choices: [ { name: 'Having multiple constructors', value: 'Having multiple constructors' }, { name: 'The ability of objects to take multiple forms', value: 'The ability of objects to take multiple forms' }, { name: 'Inheriting from multiple classes', value: 'Inheriting from multiple classes' }, { name: 'Creating multiple instances', value: 'Creating multiple instances' } ], correctAnswer: 'The ability of objects to take multiple forms', category: 'OOP' }, { question: 'Which principle states that a class should have only one reason to change?', choices: [ { name: 'Single Responsibility Principle', value: 'Single Responsibility Principle' }, { name: 'Open/Closed Principle', value: 'Open/Closed Principle' }, { name: 'Liskov Substitution Principle', value: 'Liskov Substitution Principle' }, { name: 'Dependency Inversion Principle', value: 'Dependency Inversion Principle' } ], correctAnswer: 'Single Responsibility Principle', category: 'SOLID' }, { question: 'What is encapsulation?', choices: [ { name: 'Hiding implementation details', value: 'Hiding implementation details' }, { name: 'Creating multiple objects', value: 'Creating multiple objects' }, { name: 'Inheriting properties', value: 'Inheriting properties' }, { name: 'Overloading methods', value: 'Overloading methods' } ], correctAnswer: 'Hiding implementation details', category: 'OOP' }, { question: 'What is the main advantage of using version control?', choices: [ { name: 'Faster compilation', value: 'Faster compilation' }, { name: 'Track changes and collaborate', value: 'Track changes and collaborate' }, { name: 'Better performance', value: 'Better performance' }, { name: 'Automatic testing', value: 'Automatic testing' } ], correctAnswer: 'Track changes and collaborate', category: 'Development' }, { question: 'What does API stand for?', choices: [ { name: 'Application Programming Interface', value: 'Application Programming Interface' }, { name: 'Advanced Programming Integration', value: 'Advanced Programming Integration' }, { name: 'Automated Program Installation', value: 'Automated Program Installation' }, { name: 'Application Process Interaction', value: 'Application Process Interaction' } ], correctAnswer: 'Application Programming Interface', category: 'Development' }, // Additional Algorithm Questions { question: 'Which sorting algorithm has the best average-case time complexity?', choices: [ { name: 'Bubble Sort', value: 'Bubble Sort' }, { name: 'Selection Sort', value: 'Selection Sort' }, { name: 'Merge Sort', value: 'Merge Sort' }, { name: 'Insertion Sort', value: 'Insertion Sort' } ], correctAnswer: 'Merge Sort', category: 'Algorithms' }, { question: 'What is the time complexity of bubble sort?', choices: [ { name: 'O(n)', value: 'O(n)' }, { name: 'O(n log n)', value: 'O(n log n)' }, { name: 'O(n^2)', value: 'O(n^2)' }, { name: 'O(log n)', value: 'O(log n)' } ], correctAnswer: 'O(n^2)', category: 'Algorithms' }, { question: 'Which data structure is best for implementing a priority queue?', choices: [ { name: 'Array', value: 'Array' }, { name: 'Linked List', value: 'Linked List' }, { name: 'Heap', value: 'Heap' }, { name: 'Stack', value: 'Stack' } ], correctAnswer: 'Heap', category: 'Data Structures' }, { question: 'What is the maximum number of edges in a simple graph with n vertices?', choices: [ { name: 'n', value: 'n' }, { name: 'n-1', value: 'n-1' }, { name: 'n(n-1)/2', value: 'n(n-1)/2' }, { name: 'n^2', value: 'n^2' } ], correctAnswer: 'n(n-1)/2', category: 'Graphs' }, { question: 'Which algorithm is used to detect cycles in a directed graph?', choices: [ { name: 'BFS', value: 'BFS' }, { name: 'DFS', value: 'DFS' }, { name: 'Dijkstra', value: 'Dijkstra' }, { name: 'Floyd-Warshall', value: 'Floyd-Warshall' } ], correctAnswer: 'DFS', category: 'Graphs' }, // More JavaScript Questions { question: 'What is the result of: [] + []?', choices: [ { name: '[]', value: '[]' }, { name: '""', value: '""' }, { name: 'undefined', value: 'undefined' }, { name: 'null', value: 'null' } ], correctAnswer: '""', category: 'JavaScript' }, { question: 'Which method is used to combine arrays in JavaScript?', choices: [ { name: 'concat()', value: 'concat()' }, { name: 'combine()', value: 'combine()' }, { name: 'merge()', value: 'merge()' }, { name: 'join()', value: 'join()' } ], correctAnswer: 'concat()', category: 'JavaScript' }, { question: 'What does JSON stand for?', choices: [ { name: 'JavaScript Object Notation', value: 'JavaScript Object Notation' }, { name: 'JavaScript Online Notation', value: 'JavaScript Online Notation' }, { name: 'Java Standard Object Notation', value: 'Java Standard Object Notation' }, { name: 'JavaScript Organized Network', value: 'JavaScript Organized Network' } ], correctAnswer: 'JavaScript Object Notation', category: 'JavaScript' }, { question: 'Which operator is used for strict equality in JavaScript?', choices: [ { name: '=', value: '=' }, { name: '==', value: '==' }, { name: '===', value: '===' }, { name: '!=', value: '!=' } ], correctAnswer: '===', category: 'JavaScript' }, { question: 'What is the purpose of the setTimeout() function?', choices: [ { name: 'To stop execution', value: 'To stop execution' }, { name: 'To execute code after a delay', value: 'To execute code after a delay' }, { name: 'To loop through arrays', value: 'To loop through arrays' }, { name: 'To validate input', value: 'To validate input' } ], correctAnswer: 'To execute code after a delay', category: 'JavaScript' }, // Web Development { question: 'What does CSS stand for?', choices: [ { name: 'Cascading Style Sheets', value: 'Cascading Style Sheets' }, { name: 'Computer Style Sheets', value: 'Computer Style Sheets' }, { name: 'Creative Style Sheets', value: 'Creative Style Sheets' }, { name: 'Colorful Style Sheets', value: 'Colorful Style Sheets' } ], correctAnswer: 'Cascading Style Sheets', category: 'Web Development' }, { question: 'Which HTTP method is used to retrieve data?', choices: [ { name: 'POST', value: 'POST' }, { name: 'GET', value: 'GET' }, { name: 'PUT', value: 'PUT' }, { name: 'DELETE', value: 'DELETE' } ], correctAnswer: 'GET', category: 'Web Development' }, { question: 'What is the default port for HTTP?', choices: [ { name: '80', value: '80' }, { name: '443', value: '443' }, { name: '8080', value: '8080' }, { name: '3000', value: '3000' } ], correctAnswer: '80', category: 'Web Development' }, { question: 'Which tag is used to create a hyperlink in HTML?', choices: [ { name: '<link>', value: '<link>' }, { name: '<a>', value: '<a>' }, { name: '<href>', value: '<href>' }, { name: '<url>', value: '<url>' } ], correctAnswer: '<a>', category: 'Web Development' }, { question: 'What does DOM stand for?', choices: [ { name: 'Document Object Model', value: 'Document Object Model' }, { name: 'Data Object Management', value: 'Data Object Management' }, { name: 'Dynamic Object Method', value: 'Dynamic Object Method' }, { name: 'Document Oriented Model', value: 'Document Oriented Model' } ], correctAnswer: 'Document Object Model', category: 'Web Development' }, // Database Questions { question: 'What does SQL stand for?', choices: [ { name: 'Structured Query Language', value: 'Structured Query Language' }, { name: 'Standard Query Language', value: 'Standard Query Language' }, { name: 'Sequential Query Language', value: 'Sequential Query Language' }, { name: 'Simple Query Language', value: 'Simple Query Language' } ], correctAnswer: 'Structured Query Language', category: 'Database' }, { question: 'Which keyword is used to retrieve data from a database?', choices: [ { name: 'GET', value: 'GET' }, { name: 'SELECT', value: 'SELECT' }, { name: 'RETRIEVE', value: 'RETRIEVE' }, { name: 'FETCH', value: 'FETCH' } ], correctAnswer: 'SELECT', category: 'Database' }, { question: 'What is a primary key?', choices: [ { name: 'A key that opens the database', value: 'A key that opens the database' }, { name: 'A unique identifier for each record', value: 'A unique identifier for each record' }, { name: 'The first column in a table', value: 'The first column in a table' }, { name: 'A password for the database', value: 'A password for the database' } ], correctAnswer: 'A unique identifier for each record', category: 'Database' }, { question: 'Which normal form eliminates transitive dependencies?', choices: [ { name: '1NF', value: '1NF' }, { name: '2NF', value: '2NF' }, { name: '3NF', value: '3NF' }, { name: 'BCNF', value: 'BCNF' } ], correctAnswer: '3NF', category: 'Database' }, { question: 'What is the purpose of an index in a database?', choices: [ { name: 'To count records', value: 'To count records' }, { name: 'To improve query performance', value: 'To improve query performance' }, { name: 'To backup data', value: 'To backup data' }, { name: 'To encrypt data', value: 'To encrypt data' } ], correctAnswer: 'To improve query performance', category: 'Database' }, // More Data Structure Questions { question: 'Which operation is NOT supported by a stack?', choices: [ { name: 'Push', value: 'Push' }, { name: 'Pop', value: 'Pop' }, { name: 'Peek', value: 'Peek' }, { name: 'Random Access', value: 'Random Access' } ], correctAnswer: 'Random Access', category: 'Data Structures' }, { question: 'What is the time complexity of inserting an element at the beginning of a linked list?', choices: [ { name: 'O(1)', value: 'O(1)' }, { name: 'O(n)', value: 'O(n)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(n^2)', value: 'O(n^2)' } ], correctAnswer: 'O(1)', category: 'Data Structures' }, { question: 'Which tree traversal visits nodes level by level?', choices: [ { name: 'Inorder', value: 'Inorder' }, { name: 'Preorder', value: 'Preorder' }, { name: 'Postorder', value: 'Postorder' }, { name: 'Level order', value: 'Level order' } ], correctAnswer: 'Level order', category: 'Trees' }, { question: 'What is the maximum height of a binary tree with n nodes?', choices: [ { name: 'n', value: 'n' }, { name: 'n-1', value: 'n-1' }, { name: 'log n', value: 'log n' }, { name: 'n/2', value: 'n/2' } ], correctAnswer: 'n-1', category: 'Trees' }, { question: 'Which data structure is used in breadth-first search?', choices: [ { name: 'Stack', value: 'Stack' }, { name: 'Queue', value: 'Queue' }, { name: 'Priority Queue', value: 'Priority Queue' }, { name: 'Deque', value: 'Deque' } ], correctAnswer: 'Queue', category: 'Algorithms' }, // Advanced JavaScript { question: 'What is event bubbling in JavaScript?', choices: [ { name: 'Events moving from child to parent', value: 'Events moving from child to parent' }, { name: 'Events moving from parent to child', value: 'Events moving from parent to child' }, { name: 'Creating new events', value: 'Creating new events' }, { name: 'Removing events', value: 'Removing events' } ], correctAnswer: 'Events moving from child to parent', category: 'JavaScript' }, { question: 'What is the difference between let and var?', choices: [ { name: 'No difference', value: 'No difference' }, { name: 'let has block scope, var has function scope', value: 'let has block scope, var has function scope' }, { name: 'var has block scope, let has function scope', value: 'var has block scope, let has function scope' }, { name: 'let is deprecated', value: 'let is deprecated' } ], correctAnswer: 'let has block scope, var has function scope', category: 'JavaScript' }, { question: 'What is a Promise in JavaScript?', choices: [ { name: 'A function that always returns true', value: 'A function that always returns true' }, { name: 'An object representing eventual completion of an async operation', value: 'An object representing eventual completion of an async operation' }, { name: 'A type of loop', value: 'A type of loop' }, { name: 'A method to create objects', value: 'A method to create objects' } ], correctAnswer: 'An object representing eventual completion of an async operation', category: 'JavaScript' }, { question: 'What does the async keyword do?', choices: [ { name: 'Makes a function synchronous', value: 'Makes a function synchronous' }, { name: 'Makes a function return a Promise', value: 'Makes a function return a Promise' }, { name: 'Stops function execution', value: 'Stops function execution' }, { name: 'Creates a new thread', value: 'Creates a new thread' } ], correctAnswer: 'Makes a function return a Promise', category: 'JavaScript' }, { question: 'What is destructuring in JavaScript?', choices: [ { name: 'Breaking objects permanently', value: 'Breaking objects permanently' }, { name: 'Extracting values from arrays or objects', value: 'Extracting values from arrays or objects' }, { name: 'Creating new objects', value: 'Creating new objects' }, { name: 'Deleting properties', value: 'Deleting properties' } ], correctAnswer: 'Extracting values from arrays or objects', category: 'JavaScript' }, // Design Patterns { question: 'Which pattern ensures only one instance of a class exists?', choices: [ { name: 'Factory', value: 'Factory' }, { name: 'Singleton', value: 'Singleton' }, { name: 'Observer', value: 'Observer' }, { name: 'Strategy', value: 'Strategy' } ], correctAnswer: 'Singleton', category: 'Design Patterns' }, { question: 'What is the MVC pattern?', choices: [ { name: 'Model-View-Controller', value: 'Model-View-Controller' }, { name: 'Multiple-Variable-Control', value: 'Multiple-Variable-Control' }, { name: 'Method-Value-Class', value: 'Method-Value-Class' }, { name: 'Modern-Visual-Component', value: 'Modern-Visual-Component' } ], correctAnswer: 'Model-View-Controller', category: 'Design Patterns' }, { question: 'Which pattern is used to create objects without specifying their exact class?', choices: [ { name: 'Singleton', value: 'Singleton' }, { name: 'Factory', value: 'Factory' }, { name: 'Observer', value: 'Observer' }, { name: 'Decorator', value: 'Decorator' } ], correctAnswer: 'Factory', category: 'Design Patterns' }, // Additional Algorithm Questions { question: 'What is dynamic programming?', choices: [ { name: 'Programming with dynamic languages', value: 'Programming with dynamic languages' }, { name: 'Solving problems by breaking them into overlapping subproblems', value: 'Solving problems by breaking them into overlapping subproblems' }, { name: 'Creating programs at runtime', value: 'Creating programs at runtime' }, { name: 'Using multiple programming paradigms', value: 'Using multiple programming paradigms' } ], correctAnswer: 'Solving problems by breaking them into overlapping subproblems', category: 'Algorithms' }, { question: 'What is the time complexity of the Euclidean algorithm for GCD?', choices: [ { name: 'O(n)', value: 'O(n)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(n^2)', value: 'O(n^2)' }, { name: 'O(1)', value: 'O(1)' } ], correctAnswer: 'O(log n)', category: 'Algorithms' }, { question: 'Which algorithm is used to find the minimum spanning tree?', choices: [ { name: 'Dijkstra', value: 'Dijkstra' }, { name: 'Bellman-Ford', value: 'Bellman-Ford' }, { name: 'Kruskal', value: 'Kruskal' }, { name: 'Floyd-Warshall', value: 'Floyd-Warshall' } ], correctAnswer: 'Kruskal', category: 'Graphs' }, { question: 'What is the space complexity of recursive Fibonacci?', choices: [ { name: 'O(1)', value: 'O(1)' }, { name: 'O(n)', value: 'O(n)' }, { name: 'O(log n)', value: 'O(log n)' }, { name: 'O(2^n)', value: 'O(2^n)' } ], correctAnswer: 'O(n)', category: 'Algorithms' }, // More Programming Concepts { question: 'What is Big O notation used for?', choices: [ { name: 'Measuring code quality', value: 'Measuring code quality' }, { name: 'Describing algorithm complexity', value: 'Describing algorithm complexity' }, { name: 'Counting lines of code', value: 'Counting lines of code' }, { name: 'Measuring memory usage', value: 'Measuring memory usage' } ], correctAnswer: 'Describing algorithm complexity', category: 'Algorithms' }, { question: 'What is recursion?', choices: [ { name: 'A function calling itself', value: 'A function calling itself' }, { name: 'A loop that never ends', value: 'A loop that never ends' }, { name: 'Creating multiple functions', value: 'Creating multiple functions' }, { name: 'Iterating through arrays', value: 'Iterating through arrays' } ], correctAnswer: 'A function calling itself', category: 'Programming Concepts' }, { question: 'What is the base case in recursion?', choices: [ { name: 'The first function call', value: 'The first function call' }, { name: 'The condition that stops recursion', value: 'The condition that stops recursion' }, { name: 'The largest input', value: 'The largest input' }, { name: 'The error case', value: 'The error case' } ], correctAnswer: 'The condition that stops recursion', category: 'Programming Concepts' }, // System Design { question: 'What is load balancing?', choices: [ { name: 'Balancing CPU usage', value: 'Balancing CPU usage' }, { name: 'Distributing requests across multiple servers', value: 'Distributing requests across multiple servers' }, { name: 'Managing memory allocation', value: 'Managing memory allocation' }, { name: 'Optimizing database queries', value: 'Optimizing database queries' } ], correctAnswer: 'Distributing requests across multiple servers', category: 'System Design' }, { question: 'What is caching?', choices: [ { name: 'Storing data in memory for faster access', value: 'Storing data in memory for faster access' }, { name: 'Compressing files', value: 'Compressing files' }, { name: 'Encrypting data', value: 'Encrypting data' }, { name: 'Backing up data', value: 'Backing up data' } ], correctAnswer: 'Storing data in memory for faster access', category: 'System Design' }, { question: 'What is horizontal scaling?', choices: [ { name: 'Adding more powerful hardware', value: 'Adding more powerful hardware' }, { name: 'Adding more servers', value: 'Adding more servers' }, { name: 'Optimizing code', value: 'Optimizing code' }, { name: 'Reducing features', value: 'Reducing features' } ], correctAnswer: 'Adding more servers', category: 'System Design' }, // Testing { question: 'What is unit testing?', choices: [ { name: 'Testing the entire application', value: 'Testing the entire application' }, { name: 'Testing individual components in isolation', value: 'Testing individual components in isolation' }, { name: 'Testing user interfaces', value: 'Testing user interfaces' }, { name: 'Testing performance', value: 'Testing performance' } ], correctAnswer: 'Testing individual components in isolation', category: 'Testing' }, { question: 'What is TDD?', choices: [ { name: 'Test-Driven Development', value: 'Test-Driven Development' }, { name: 'Time-Driven Development', value: 'Time-Driven Development' }, { name: 'Technology-Driven Development', value: 'Technology-Driven Development' }, { name: 'Team-Driven Development', value: 'Team-Driven Development' } ], correctAnswer: 'Test-Driven Development', category: 'Testing' }, { question: 'What is the purpose of integration testing?', choices: [ { name: 'Testing individual functions', value: 'Testing individual functions' }, { name: 'Testing how components work together', value: 'Testing how components work together' }, { name: 'Testing user experience', value: 'Testing user experience' }, { name: 'Testing performance', value: 'Testing performance' } ], correctAnswer: 'Testing how components work together', category: 'Testing' }, // Git and Version Control { question: 'What does git clone do?', choices: [ { name: 'Creates a copy of a repository', value: 'Creates a copy of a repository' }, { name: 'Merges two branches', value: 'Merges two branches' }, { name: 'Deletes a repository', value: 'Deletes a repository' }, { name: 'Backs up changes', value: 'Backs up changes' } ], correctAnswer: 'Creates a copy of a repository', category: 'Git' }, { question: 'What is a git branch?', choices: [ { name: 'A backup of the code', value: 'A backup of the code' }, { name: 'A parallel version of the repository', value: 'A parallel version of the repository' }, { name: 'A deleted file', value: 'A deleted file' }, { name: 'A merge conflict', value: 'A merge conflict' } ], correctAnswer: 'A parallel version of the repository', category: 'Git' }, { question: 'What does git commit do?', choices: [ { name: 'Downloads changes', value: 'Downloads changes' }, { name: 'Saves changes to the local repository', value: 'Saves changes to the local repository' }, { name: 'Uploads changes to remote', value: 'Uploads changes to remote' }, { name: 'Merges branches', value: 'Merges branches' } ], correctAnswer: 'Saves changes to the local repository', category: 'Git' }, // Node.js { question: 'What is Node.js?', choices: [ { name: 'A web browser', value: 'A web browser' }, { name: 'A JavaScript runtime for server-side development', value: 'A JavaScript runtime for server-side development' }, { name: 'A database', value: 'A database' }, { name: 'A CSS framework', value: 'A CSS framework' } ], correctAnswer: 'A JavaScript runtime for server-side development', category: 'Node.js' }, { question: 'What is npm?', choices: [ { name: 'Node Package Manager', value: 'Node Package Manager' }, { name: 'New Programming Method', value: 'New Programming Method' }, { name: 'Network Protocol Manager', value: 'Network Protocol Manager' }, { name: 'Node Performance Monitor', value: 'Node Performance Monitor' } ], correctAnswer: 'Node Package Manager', category: 'Node.js' }, { question: 'Which file contains project dependencies in Node.js?', choices: [ { name: 'dependencies.json', value: 'dependencies.json' }, { name: 'package.json', value: 'package.json' }, { name: 'node.json', value: 'node.json' }, { name: 'config.json', value: 'config.json' } ], correctAnswer: 'package.json', category: 'Node.js' }, // React { question: 'What is JSX?', choices: [ { name: 'JavaScript XML', value: 'JavaScript XML' }, { name: 'Java Syntax Extension', value: 'Java Syntax Extension' }, { name: 'JSON Extended', value: 'JSON Extended' }, { name: 'JavaScript Execution', value: 'JavaScript Execution' } ], correctAnswer: 'JavaScript XML', category: 'React' }, { question: 'What is a React component?', choices: [ { name: 'A JavaScript function or class that returns JSX', value: 'A JavaScript function or class that returns JSX' }, { name: 'A CSS file', value: 'A CSS file' }, { name: 'A database table', value: 'A database table' }, { name: 'A server endpoint', value: 'A server endpoint' } ], correctAnswer: 'A JavaScript function or class that returns JSX', category: 'React' }, { question: 'What is state in React?', choices: [ { name: 'A country or province', value: 'A country or province' }, { name: 'Data that changes over time in a component', value: 'Data that changes over time in a component' }, { name: 'A CSS property', value: 'A CSS property' }, { name: 'A type of component', value: 'A type of component' } ], correctAnswer: 'Data that changes over time in a component', category: 'React' } ];