The worst-case time complexity of quicksort is ___________.
- O(1)
- O(n log n)
- O(n)
- O(n^2)
Quicksort's worst-case time complexity is ?(?2)O(n2), occurring when the pivot selection consistently results in unbalanced partitions, leading to many recursive calls and inefficient sorting, especially for sorted or nearly sorted data.
What is the purpose of the "alt" attribute in an HTML image tag?
- Alignment
- Alternative text
- Animation
- Attributes
The purpose of the "alt" attribute in an HTML image tag is to provide alternative text for an image. This text is displayed in place of the image if the image file cannot be loaded or if the user is using a screen reader. It is important for accessibility and SEO purposes.
Dynamic programming can be categorized into two main types: ___________ and ___________.
- Bottom-Up
- Iterative
- Recursive
- Top-Down
Dynamic programming can be broadly categorized into bottom-up (iterative) and top-down (recursive) approaches. Bottom-up DP starts from solving the smallest subproblems and builds up to the main problem, while top-down DP starts from the main problem and recursively solves smaller subproblems.
To prevent SQL injection attacks, web applications should use ___________ statements or parameterized queries.
- Dynamic SQL
- Escaped Input
- Prepared Statements
- Sanitized Input
SQL injection is a type of cyber attack where malicious SQL code is inserted into input fields of a web application, allowing attackers to access and manipulate the database. Using prepared statements or parameterized queries is an effective defense against SQL injection because they allow the database to distinguish between code and data, preventing attackers from executing arbitrary SQL commands. Sanitizing input and using escaped input are also good practices but may not provide as robust protection as prepared statements.
The ___________ step in dynamic programming involves breaking down the problem into smaller subproblems.
- Analysis
- Decomposition
- Design
- Synthesis
Decomposition is a critical step in dynamic programming where a complex problem is broken down into smaller, more manageable subproblems. This allows for the application of dynamic programming techniques, such as memoization or tabulation, to solve the problem efficiently.
What is the difference between Waterfall and Agile methodologies in terms of adaptability to change?
- Agile encourages adaptive planning and
- Agile methodology is iterative and flexible,
- Waterfall focuses on comprehensive upfront
- Waterfall methodology is linear and rigid,
Waterfall methodology follows a sequential approach where each phase must be completed before moving to the next, making it less adaptable to change. In contrast, Agile methodology promotes iterative development, continuous feedback, and changes in requirements, enabling better adaptability and responsiveness to change.
How does roaming work in wireless networks, and what role does it play in maintaining connectivity for mobile devices?
- Allows devices to switch between access points without losing connection
- Facilitates seamless connectivity while moving between different networks
- Maintains session continuity by transferring data packets between access points
- Uses signal strength to determine the best access point for connection
Roaming enables devices to switch between access points without losing connectivity, crucial for maintaining seamless connections as mobile devices move between different areas or networks.
What is the time complexity of accessing an element in an array?
- O(1)
- O(n)
- O(log n)
- O(n log n)
Option 1, O(1), represents constant time complexity. Accessing an element in an array by its index takes the same amount of time, regardless of the array size. Hence, it is independent of the array's size, resulting in constant time complexity.
The process of dynamically adjusting transmission power levels to maintain a stable connection in wireless networks is known as ___________.
- Adaptive Modulation
- Channel Optimization
- Dynamic Scaling
- Power Adaptation
Adaptive Modulation refers to the technique of dynamically adjusting transmission parameters, such as power levels, to optimize performance and maintain stable connections in wireless networks.
Which SQL clause is used to filter records in a SELECT statement?
- FILTER
- GROUP BY
- HAVING
- WHERE
The SQL clause used to filter records in a SELECT statement is the WHERE clause. It allows you to specify conditions that the rows must meet to be included in the result set. This is essential for retrieving specific data based on criteria such as values in certain columns or combinations of conditions.
In network security, a ___________ is used to inspect and filter incoming and outgoing network traffic.
- Firewall
- Intrusion Detection System (IDS)
- Proxy Server
- VPN
A firewall is a network security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks.
Your team consists of members from different geographical locations. How would you ensure effective communication and collaboration throughout the SDLC process?
- Use collaboration tools like Slack, Microsoft Teams, or Jira for real-time communication and task tracking. Implement regular video conferences and meetings for team alignment.
- Establish clear communication protocols and standards. Utilize project management software with built-in collaboration features. Schedule regular virtual meetings and progress reviews.
- Encourage open communication channels and cultural sensitivity training. Implement agile practices like daily stand-ups and virtual sprint planning sessions.
- Develop a comprehensive communication plan with regular updates, progress tracking, and feedback mechanisms.
Option 1 suggests leveraging modern collaboration tools to facilitate real-time communication and task tracking, along with regular virtual meetings for alignment. This approach ensures timely updates, transparency, and efficient collaboration despite geographical distances. Options 2, 3, and 4 also focus on communication protocols and virtual meetings but lack the emphasis on modern tools for real-time collaboration.