McAfee
10+ Interview Questions and Answers
Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.
If there are an odd number of elements, return the middle element if t...read more
You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.
For example:
For the given binary tree
The level order traversa...read more
Q3. Can aggregate functions be used with HAVING clause? With WHERE clause? What is the difference between WHERE and HAVING clause? Can HAVING be used without GROUP BY?
Yes, aggregate functions can be used with HAVING and WHERE clauses. WHERE filters rows before grouping, HAVING filters groups after grouping.
Aggregate functions can be used with HAVING clause to filter groups based on the result of the aggregate function.
Aggregate functions can also be used with WHERE clause to filter rows before grouping.
WHERE clause filters rows before grouping, while HAVING clause filters groups after grouping.
HAVING clause requires a GROUP BY clause, but ...read more
Q4. What is initializer list in C++ and code it with example?
Initializer list is a syntax in C++ to initialize objects with a list of values.
Initializer list is enclosed in curly braces {}.
It can be used to initialize arrays, structs, and classes.
Example: int arr[] = {1, 2, 3};
Example: struct Point { int x, y; } p = {1, 2};
Example: class Person { public: string name; int age; } p = {"John", 30};
Q5. What if a reported bug is rejected by developer and not considered a bug?
Discuss with the developer and provide evidence to support the bug report.
Communicate with the developer to understand their perspective
Provide evidence to support the bug report
Collaborate with the developer to find a solution
If necessary, escalate the issue to a higher authority
Q6. What are User Defined Functions? Stored Procedures? Triggers?
User Defined Functions, Stored Procedures, and Triggers are database objects used to perform specific tasks in database management systems.
User Defined Functions are custom functions created by users to perform specific calculations or operations in a database.
Stored Procedures are precompiled SQL statements that can be executed by calling the procedure name.
Triggers are special types of stored procedures that are automatically executed in response to certain events on a part...read more
Q7. What is the order of execution of a SQL Query?
The order of execution of a SQL query is: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY.
FROM: Specifies the tables involved in the query
WHERE: Filters the rows based on specified conditions
GROUP BY: Groups the rows that have the same values into summary rows
HAVING: Filters the groups based on specified conditions
SELECT: Selects the columns to be displayed in the result set
ORDER BY: Sorts the result set based on specified columns
Q8. Write Fibonacci sequence code for three sum instead of two
Fibonacci sequence code for three sum instead of two
Initialize variables for first, second, and third numbers
Use a loop to generate the sequence up to the desired length
Add the three previous numbers to get the next number in the sequence
Q9. What is Smart Pointer?
Smart Pointer is a class that provides automatic memory management for dynamically allocated objects.
Smart pointers are used to prevent memory leaks in C++.
They automatically delete the object they point to when it is no longer needed.
There are two types of smart pointers: unique_ptr and shared_ptr.
unique_ptr is used when there is only one owner of the object.
shared_ptr is used when there are multiple owners of the object.
Q10. Explain how to create a custom directive in angular
Creating a custom directive in Angular involves defining a new directive using the 'directive' method.
Define a new directive using the 'directive' method in Angular module
Specify the directive's name, template, controller, and any other necessary properties
Use the directive in HTML by referencing its name as an attribute or element
Q11. What are Set operators :
Set operators are used to combine the result sets of two or more SELECT statements.
Set operators include UNION, UNION ALL, INTERSECT, and MINUS.
UNION combines the result sets of two SELECT statements, removing duplicates.
UNION ALL combines the result sets of two SELECT statements, including duplicates.
INTERSECT returns only the rows that appear in both result sets.
MINUS returns only the rows that appear in the first result set but not in the second.
Q12. Explain Software Testing Lifecycle?
Software Testing Lifecycle is a process of verifying and validating software applications before release.
STLC involves planning, designing, executing, and reporting of tests.
It includes test case creation, test execution, and defect tracking.
STLC ensures that the software meets the specified requirements and is of high quality.
It consists of various phases such as requirement analysis, test planning, test design, test execution, and test closure.
STLC is an iterative process t...read more
Q13. Sort a linked list
Sort a linked list
Use merge sort or quick sort algorithm
Divide the linked list into two halves
Recursively sort each half
Merge the sorted halves
Q14. Difference between truncate and delete
Truncate is a DDL command that removes all rows from a table, while delete is a DML command that removes specific rows.
Truncate is faster than delete as it does not generate undo logs.
Truncate resets the high water mark of the table, while delete does not.
Truncate cannot be rolled back, while delete can be rolled back using a transaction.
Truncate does not fire any triggers, while delete does.
Truncate does not require a WHERE clause, while delete does.
Q15. Decline in metrics - Root Cause Analysis
Decline in metrics can be caused by various factors, requiring a thorough root cause analysis.
Identify the specific metrics that have declined
Review any recent changes or updates that may have impacted the metrics
Consider external factors such as market trends or competitor actions
Evaluate internal processes and systems for any inefficiencies or errors
Engage with team members to gather insights and perspectives on potential causes
Q16. One critical customer scenario
Handling a customer experiencing technical difficulties with our product
Listen to the customer's issue and empathize with their frustration
Troubleshoot the problem by asking relevant questions and guiding the customer through potential solutions
Offer alternative options or workarounds if the issue cannot be immediately resolved
Follow up with the customer to ensure the problem has been resolved to their satisfaction
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month