Docker uses ________ files to define the configuration of a containerized application.
- .yaml
- .json
- .cfg
- .dockerfile
The correct option is ".dockerfile." Docker uses Dockerfiles, which are plain text configuration files with a specific syntax, to define the steps needed to create a container image. These files specify the base image, environment variables, dependencies, and commands to run when the container starts. Dockerfiles are essential for building reproducible and version-controlled containerized applications, making it easier to manage and scale container deployments.
When is it preferable to use merge sort over quicksort?
- Input size
- Memory usage
- Stability of sorting
- Time complexity
Merge sort is preferable over quicksort when dealing with large input sizes due to its guaranteed O(n log n) time complexity, which is advantageous over quicksort's worst-case O(n^2) time complexity.
Which type of linked list is best suited for implementing a stack?
- Array-based list
- Circular linked list
- Doubly linked list
- Singly linked list
A singly linked list is best suited for implementing a stack because it only requires a pointer to the top element, allowing for efficient insertion and removal operations at the top of the stack.
Query _______ involves rearranging the execution plan of a query to improve its performance.
- Analysis
- Compilation
- Debugging
- Optimization
Query optimization is the process of rearranging the execution plan of a query to enhance its performance. This optimization can involve various techniques such as selecting appropriate indexes, restructuring the query, or using hints to guide the database optimizer in choosing the most efficient execution path. By optimizing queries, database administrators and developers aim to reduce query execution time and resource consumption.
Which entity has its own address space in memory: process or thread?
- Both
- Neither
- Process
- Thread
A process has its own address space in memory, which includes code, data, and resources allocated to that process. This separation ensures that processes can operate independently without interfering with each other's memory space. Threads, on the other hand, share the same address space within a process and can directly access shared data and resources. Understanding this distinction is fundamental in designing efficient and secure concurrent applications.
In Scrum, the ___________ is responsible for prioritizing the backlog and ensuring the team has a clear understanding of the work to be done.
- Development Team
- Product Owner
- Project Manager
- Scrum Master
The Product Owner in Scrum is responsible for managing the product backlog, which includes prioritizing tasks and ensuring that the team understands the requirements and goals of each item in the backlog. The Scrum Master, on the other hand, focuses on facilitating the Scrum process and removing impediments.
Your Agile team is experiencing low morale after a series of failed sprints. How would you boost team morale and productivity while adhering to Agile principles?
- Conduct one-on-one meetings with team members to understand their concerns and provide necessary support or training to address skill gaps.
- Implement a reward system based on sprint performance to incentivize team members and encourage collaboration.
- Increase the workload for underperforming team members to improve productivity and meet sprint goals.
- Organize team-building activities and acknowledge individual and team achievements to boost morale and foster a positive work environment.
Boosting team morale and productivity requires a multifaceted approach, including addressing individual concerns, fostering teamwork through activities and recognition, and providing incentives aligned with Agile principles of collaboration and continuous improvement.
In a relational database, a ___________ allows efficient retrieval of records based on specific criteria.
- Primary Key
- Index
- Foreign Key
- Unique Key
An index in a relational database is a data structure that allows for efficient retrieval of records based on specific criteria. It acts as a pointer to the data in the table and can significantly speed up queries by providing quick access to rows that meet certain conditions. A primary key is a specific type of index that uniquely identifies each record in a table. A foreign key is used to establish relationships between tables. A unique key ensures that no two records have the same values in specified columns. While all these options are related to data retrieval and optimization, an index is specifically designed for efficient search operations, making it the most suitable choice.
What is the role of HATEOAS in RESTful APIs?
- Define the structure of data responses
- Enable self-discovery of resources and actions
- Secure API endpoints
- Standardize error handling
HATEOAS (Hypertext As The Engine Of Application State) allows RESTful APIs to provide links within responses for clients to discover related resources and available actions, promoting self-discovery and reducing coupling.
You're developing a real-time chat application using Node.js. How would you implement WebSocket communication for instant messaging?
- Implement WebSocket protocol directly using native Node.js APIs.
- Use the 'express-ws' library for WebSocket functionality with Express.js.
- Use the 'ws' library and create a WebSocket server.
- Utilize Socket.IO library for WebSocket communication.
WebSocket communication is crucial for real-time chat apps. Socket.IO provides a robust framework for WebSocket communication, including features like automatic reconnection, event handling, and room management, making it suitable for instant messaging applications in Node.js.