Virtusa Consulting Services
300+ Quadrant Consumer Products Interview Questions and Answers
Q1. Reverse Stack with Recursion
Reverse a given stack of integers using recursion. You must accomplish this without utilizing extra space beyond the internal stack space used by recursion. Additionally, you must r...read more
Reverse a given stack of integers using recursion without using extra space or loop constructs.
Use recursion to pop all elements from the original stack and store them in function call stack.
Once the stack is empty, push the elements back in reverse order using recursion.
Ensure to handle base cases like empty stack or single element stack.
Example: If the input stack is [1, 2, 3], after reversal it should be [3, 2, 1].
Q2. Word Occurrence Counting
Given a string 'S' of words, the goal is to determine the frequency of each word in the string. Consider a word as a sequence of one or more non-space characters. The string can have mu...read more
Count the frequency of each word in a given string.
Split the input string by spaces to get individual words.
Use a hashmap to store the frequency of each word.
Iterate through the words and update the hashmap accordingly.
Print the unique words and their frequencies from the hashmap.
Number and Digits Problem Statement
You are provided with a positive integer N
. Your task is to identify all numbers such that the sum of the number and its digits equals N
.
Example:
Input:
N = 21
Output:
[15]
Identify numbers where sum of number and its digits equals given integer N.
Iterate through numbers from 1 to N and check if sum of number and its digits equals N
Use a helper function to calculate sum of digits for a given number
Return the numbers that satisfy the condition in increasing order, else return -1
Q4. Reverse Linked List Problem Statement
Given a singly linked list of integers, return the head of the reversed linked list.
Example:
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.
Use three pointers to keep track of the current, previous, and next nodes while reversing the linked list.
Update the head of the reversed linked list as the last node encountered during the reversal process.
Q5. Guesstimate on how many flights on a day in Delhi airport
Approximately 1,200 flights per day operate from Delhi airport.
Delhi airport is one of the busiest airports in India
It operates both domestic and international flights
On average, there are around 50 flights per hour
The number of flights may vary depending on the season and day of the week
Q6. Find the Third Greatest Element
Given an array 'ARR' of 'N' distinct integers, determine the third largest element in the array.
Input:
The first line contains a single integer 'T' representing the number of te...read more
Find the third largest element in an array of distinct integers.
Sort the array in descending order and return the element at index 2.
Handle cases where the array has less than 3 elements separately.
Consider edge cases like negative numbers and duplicates.
Q7. 1.What is constraints and it's types? 2.what is meant by wrapper class? 3.What is meant by string buffer? 4.Write a program to print number of count of characters in a string and remove duplicates by giving use...
read moreThis interview includes questions related to constraints, wrapper class, string buffer, and programming.
Constraints are rules that limit the values or types of data that can be entered into a field or table. There are two types of constraints: column-level and table-level constraints.
Wrapper classes are classes that encapsulate primitive data types and provide methods to manipulate them. For example, Integer is a wrapper class for the int primitive data type.
StringBuffer is a...read more
Q8. Anagram Pairs Verification Problem
Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more
Determine if two strings are anagrams of each other by checking if they contain the same characters.
Create character frequency maps for both strings
Compare the frequency of characters in both maps to check if they are anagrams
Return True if the frequencies match, False otherwise
Q9. Queue Using Stacks Implementation
Design a queue data structure following the FIFO (First In First Out) principle using only stack instances.
Explanation:
Your task is to complete predefined functions to suppor...read more
Implement a queue using stacks following FIFO principle.
Use two stacks to simulate a queue - one for enqueue and one for dequeue operations.
For enQueue operation, push elements onto the enqueue stack.
For deQueue operation, if the dequeue stack is empty, pop all elements from enqueue stack to dequeue stack.
For peek operation, return the top element of the dequeue stack.
For isEmpty operation, check if both stacks are empty.
Example: enQueue(5), enQueue(10), peek() -> 5, deQueue(...read more
The three levels of data abstraction in a Database Management System are Physical Level, Logical Level, and View Level.
Physical Level: Deals with how data is stored on the storage medium. It includes details like data structures, file organization, and indexing.
Logical Level: Focuses on how data is viewed by users. It hides the physical storage details and presents a logical view of the database.
View Level: Represents a subset of the database to specific users. It provides a ...read more
Q11. Rat in a Maze Problem Statement
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions (up, down, left, right) from each cell.
Add the current direction to the path and recursively explore further.
If the destination is reached, add the path to the list of valid paths.
Q12. Minimum Number of Swaps to Sort an Array
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
Input:
T (number of test cases)
For each test case:
N (size of the...read more
The minimum number of swaps required to sort a given array of distinct elements in ascending order.
Use a hashmap to store the original indices of the elements in the array.
Iterate through the array and swap elements to their correct positions.
Count the number of swaps needed to sort the array.
Q13. Print Permutations - String Problem Statement
Given an input string 'S', you are tasked with finding and returning all possible permutations of the input string.
Input:
The first and only line of input contains...read more
The task is to find and return all possible permutations of a given input string.
Use recursion to generate all possible permutations of the input string.
Swap characters in the string to generate different permutations.
Handle duplicate characters by using a set to store unique permutations.
Return the list of permutations as an array of strings.
Q14. Unix: 1)How we simply find files in directory 2)count of word by using grep command 3)how we kill the particular process 4)command for findout kernal version and on which operating system we worked on 5)what is...
read moreTechnical interview questions on Unix and SQL
To find files in a directory, use the 'find' command
To count words using grep, use the '-c' option
To kill a particular process, use the 'kill' command with the process ID
To find the kernel version and operating system, use the 'uname' command
The 'top' command is used to monitor system processes and resource usage
A zombie process is a process that has completed execution but still has an entry in the process table
Joins in SQL are us...read more
Q15. Paths in a Matrix Problem Statement
Given an 'M x N' matrix, print all the possible paths from the top-left corner to the bottom-right corner. You can only move either right (from (i,j) to (i,j+1)) or down (fro...read more
Print all possible paths from top-left to bottom-right in a matrix by moving only right or down.
Use backtracking to explore all possible paths from top-left to bottom-right in the matrix.
At each cell, recursively explore moving right and down until reaching the bottom-right corner.
Keep track of the current path and add it to the result when reaching the destination.
Q16. Coding question: 1. remove sub string and sort alphabetically 2. reverse of a given string 3. bubble sort
Coding questions on string manipulation and sorting algorithms.
For removing a substring and sorting alphabetically, use string manipulation and sorting functions.
To reverse a string, use a loop to iterate through the string and append each character to a new string in reverse order.
For bubble sort, use nested loops to compare adjacent elements and swap them if they are in the wrong order.
Account Statements Transcription is a full stack application for converting Excel sheets to SQL tables, fetching data in UI, and allowing downloads in various formats.
Create a front-end interface for users to upload Excel sheets
Develop a back-end system to convert Excel data into SQL tables
Implement a query system to fetch data based on user needs in the UI
Provide options for users to download data in Excel or Word formats
To combine two tables in SQL, you can use the JOIN clause to merge rows based on a related column.
Use the JOIN clause to specify the columns from each table that are used to match up rows.
Types of JOINs include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Example: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column;
Q19. From JAVA:- what is interface? What is collection in java? What is jdk, jre, and jvm? The interviewer wrote some code snippets in chat window and asked me for the output.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, member variables, and methods with implementation.
Interface can only have abstract methods and constants.
A class can implement multiple interfaces but can only extend one abstract class.
Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with method 'fly'.
Q21. 1) project flow which I worked in previous organization 2)which linux operating system used 3)what is the application server in your project 4)what is the webserver 5)how you login to your application 6)what ki...
read moreQuestions related to project flow, Linux OS, application and web server, troubleshooting, ticketing tool, and handling critical situations.
Worked on Agile methodology with JIRA as ticketing tool
Used Ubuntu as the Linux operating system
Tomcat was the application server and Apache was the web server
Logged in to the application using LDAP authentication
Performed troubleshooting by analyzing logs and using debugging tools
Handled critical situations by following the incident manag...read more
Q22. Types of file in synon, types of context of fields in functions, types of fields in synon, types of screen in synon and difference, purpose of arrays in synon, how to delete single and all records in arrays in...
read moreSynon file types, field contexts, screen types, array purpose and deletion in Synon
Synon file types include physical, logical, and display files
Field contexts in functions include input, output, and both
Types of fields in Synon include alphanumeric, numeric, and date
Types of screens in Synon include inquiry, maintenance, and report
Arrays in Synon are used to store multiple values of the same data type
To delete a single record in an array, use the DELETE_ARRAY_ENTRY function
To...read more
Q23. Data Structure:- What is linked list and queue? What is Stack and Heap?
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Denormalization is the opposite process.
Normalization involves breaking down a table into smaller tables and defining relationships between them to reduce redundancy.
Denormalization involves combining tables to reduce the number of joins needed for queries, sacrificing some normalization benefits for performance.
Normalization helps in maintaining data integrity and r...read more
Prisoners must devise a strategy to guess the color of their own hat based on the hats of others.
Prisoners can agree on a strategy before the hats are assigned.
One strategy is for each prisoner to count the number of hats of a certain color and use that information to guess their own hat color.
Another strategy involves using parity to determine the color of their own hat.
Prisoners can also use a signaling system to convey information about their hat color to others.
Objects are key-value pairs with methods, while Maps are collections of key-value pairs with ordered keys and better performance.
Objects are unordered collections of key-value pairs, while Maps maintain the order of insertion.
Maps allow any type of key, while Objects only allow strings and symbols as keys.
Maps have better performance for scenarios involving frequent additions and removals of key-value pairs.
Objects have prototype chain and methods like hasOwnProperty(), while...read more
HTML5 offers several advantages over its previous versions.
Improved support for multimedia elements such as audio and video tags
Enhanced support for canvas and SVG for better graphics rendering
Introduction of new semantic elements like <header>, <footer>, <nav>, <article> for better structure and accessibility
Built-in support for offline storage using local storage and session storage
Better support for drag and drop functionality and geolocation services
Set up Azure architecture for client transitioning from on-premises to cloud
Assess current on-premises infrastructure and workloads
Design Azure architecture based on client's requirements and goals
Implement Azure services such as Virtual Machines, Azure Active Directory, and Azure Storage
Set up networking and security configurations in Azure
Migrate data and applications from on-premises to Azure using tools like Azure Site Recovery
Optimize and monitor the Azure environment po...read more
Various formatting tags in HTML include <b>, <i>, <u>, <strong>, <em>, <sub>, <sup>, <strike>, <br>, <hr>, <pre>, <blockquote>, <code>, <kbd>, <samp>, <var>, <cite>, <abbr>, <address>, <small>, <big>, <font>, <center>, <s>, <del>, <ins>, <mark>, <time>, <progress>, <meter>, <q>, <dfn>, <span>, <div>, <section>, <article>, <aside>, <nav>, <header>, <footer>, <main>, <figure>, <figcaption>, <details>, <summary>, <dialog>, <menu>, <menuitem>, <legend>, <fieldset>, <label>, <butt...read more
Yes, I can create 2 tables in SQL and perform operations like INSERT, SELECT, UPDATE, and DELETE.
Create Table 1: CREATE TABLE employees (id INT, name VARCHAR(50), salary DECIMAL(10,2));
Create Table 2: CREATE TABLE departments (dept_id INT, dept_name VARCHAR(50));
Insert Data: INSERT INTO employees VALUES (1, 'John Doe', 50000);
Select Data: SELECT * FROM employees WHERE salary > 40000;
Update Data: UPDATE employees SET salary = 55000 WHERE id = 1;
Delete Data: DELETE FROM employe...read more
Q31. OOPS:-define OOPS? What are the features of OOPS? What are the types of inheritance? What is method overloading and overriding?
Major differences between @RequestMapping and @GetMapping in Spring Boot
1. @RequestMapping is a generic annotation for mapping HTTP requests to handler methods, while @GetMapping is a specialized version that only handles GET requests.
2. @GetMapping is a shortcut for @RequestMapping(method = RequestMethod.GET), making it more concise and specific.
3. @RequestMapping allows for specifying additional parameters like headers, params, and consumes/produces, while @GetMapping is li...read more
let is block-scoped while var is function-scoped in JavaScript.
let is block-scoped, meaning it is only accessible within the block it is declared in.
var is function-scoped, meaning it is accessible throughout the function it is declared in.
Using let can help prevent variable hoisting issues.
let allows for better control over variable scope and reduces the risk of unintended variable redeclarations.
Q34. What was your experience in developing a pharmacy inventory management web application with a team of 3-5 members in collaboration with Virtusa, and what technologies did you utilize for the front-end and back-...
read moreI have experience developing a pharmacy inventory management web application with a team of 3-5 members in collaboration with Virtusa.
Utilized HTML, CSS, and JavaScript for the front-end development
Used Node.js and Express.js for the back-end development
Integrated MySQL database for storing inventory data
Implemented user authentication and authorization features
Collaborated with team members to ensure smooth development process
Q35. How many stages will be created if a spark job has 3 wide transformations and 2 narrow transformations?
There will be 4 stages created in total for the spark job.
Wide transformations trigger a shuffle and create a new stage.
Narrow transformations do not trigger a shuffle and do not create a new stage.
In this case, 3 wide transformations will create 3 new stages and 2 narrow transformations will not create new stages.
Therefore, a total of 4 stages will be created.
Q36. If more than 50K records are fetched by the SOQL in the trigger. how to handle that.
To handle more than 50K records fetched by SOQL in trigger, use batch apex or pagination.
Use batch apex to process records in smaller chunks
Implement pagination to limit the number of records fetched at a time
Consider using selective SOQL queries to reduce the number of records fetched
Avoid using SOQL queries inside loops
Use query optimizer tool to optimize SOQL queries
Q37. sql command for inserting details in table,changing them and deleting specifics ones
SQL commands for inserting, updating, and deleting data from a table.
INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3);
UPDATE table_name SET column1 = new_value1 WHERE condition;
DELETE FROM table_name WHERE condition;
Q38. sql command for creating a table
SQL command for creating a table
Use CREATE TABLE statement
Specify table name and column names with data types
Add any constraints or indexes as needed
The four core API architectures that Kafka uses are Producer API, Consumer API, Streams API, and Connector API.
Producer API: Allows applications to publish streams of records to one or more Kafka topics.
Consumer API: Allows applications to subscribe to topics and process the stream of records produced to them.
Streams API: Allows creating and processing real-time data streams from one or more input topics to one or more output topics.
Connector API: Allows building and running ...read more
The @RestController annotation in Spring Boot is used to define a class as a RESTful controller.
Used to create RESTful web services in Spring Boot
Combines @Controller and @ResponseBody annotations
Eliminates the need for @ResponseBody annotation on each method
Returns data directly in the response body as JSON or XML
Spring Boot offers annotations like @SpringBootApplication, @RestController, @Autowired, @Component, @Repository, @Service, @Configuration, @RequestMapping, etc.
@SpringBootApplication - Used to mark the main class of a Spring Boot application
@RestController - Used to define RESTful web services
@Autowired - Used for automatic dependency injection
@Component - Used to indicate a class is a Spring component
@Repository - Used to indicate a class is a Spring repository
@Service - Us...read more
Q42. Explain How was your syllobus was done in Lockdown at College?
During lockdown, my college syllabus was completed through online classes and self-study.
Online classes were conducted through video conferencing platforms like Zoom or Google Meet.
Assignments and exams were taken online using tools like Google Classroom or Moodle.
Self-study involved reading textbooks, watching online tutorials, and practicing coding exercises.
Regular communication with professors and classmates through emails or discussion forums.
Adapted to the new learning ...read more
Q43. From DBMS:- What is joins? What are the types of join? He wrote a table on the chat window and asked me to find the left outer join.
To deploy multiple environment scripts using Terraform, you can use Terraform workspaces and variables.
Use Terraform workspaces to manage multiple environments such as dev, staging, and production.
Create separate Terraform configuration files for each environment, with environment-specific variables.
Use Terraform variables to define environment-specific settings like resource names, sizes, and configurations.
Utilize Terraform modules to reuse common configurations across diff...read more
Kafka monitoring is essential for ensuring optimal performance, detecting issues, and maintaining data integrity.
Real-time monitoring of data ingestion and processing
Tracking consumer lag to ensure timely data consumption
Identifying bottlenecks and optimizing cluster performance
Monitoring disk usage and network throughput
Alerting on anomalies or failures for proactive troubleshooting
Q46. If you have 20 to 40 range, what testing technique will you use?
I would use boundary value analysis testing technique.
Boundary value analysis involves testing the boundaries of valid and invalid input ranges.
It helps in identifying any issues that may occur at the boundaries of the input range.
Examples include testing a function with inputs just below, at, and just above the specified range limits.
Q47. write trigger , there are 3 objects, a is parent, b child, c is grand child, when grand child updated update grand child desc on a object desc
Write a trigger to update the description field on the parent object when the grandchild object is updated.
Create a trigger on the grandchild object
Use a SOQL query to retrieve the parent object
Update the description field on the parent object with the grandchild's description
Q48. Can you write code for printing a star in java
Yes, I can write code for printing a star in Java.
Create an array of strings to represent the star
Use a loop to iterate through each row of the array
Use another loop to iterate through each column of the array
Print the value at each row and column position
Example: String[] star = {" * ", " *** ", "*****", " *** ", " * "};
Example: for (String row : star) { System.out.println(row); }
To create an immutable class in Hibernate, use final keyword for class, make fields private and provide only getters.
Use the final keyword for the class to prevent subclassing
Make fields private to restrict direct access
Provide only getters for the fields to ensure read-only access
Avoid providing setters or mutable methods
Q50. Difference between partial and render partial in MVC?
Partial is used to render a specific portion of a view, while render partial is used to render a partial view within another view in MVC.
Partial is used to render a specific portion of a view in MVC.
Render partial is used to render a partial view within another view in MVC.
Partial can be used to render a reusable piece of code in multiple views.
Render partial is useful for rendering common elements like headers or footers in multiple views.
Example: <%= render partial: 'header...read more
Q51. Steps in recognition revenue, Revenue entries, Month end closures
Steps in revenue recognition, revenue entries, and month-end closures for Financial Accountant role.
Revenue recognition involves identifying the transaction, determining the amount of revenue to be recognized, and allocating the revenue to the appropriate period.
Revenue entries are recorded in the general ledger and include debiting accounts receivable and crediting revenue accounts.
Month-end closures involve reconciling revenue accounts, preparing financial statements, and c...read more
Q52. What is error,bug lifecycle,regression,stlc,entry and exit poitns for bug, then scenario based questions
Answering questions related to error, bug lifecycle, regression, STLC, entry and exit points for bug, and scenario-based questions.
Error is a deviation from the expected result, while a bug is a coding error that causes an error.
Bug lifecycle includes identification, reporting, prioritization, fixing, retesting, and closure.
Regression testing is performed to ensure that changes made to the software do not introduce new bugs.
STLC (Software Testing Life Cycle) includes planning...read more
Query Cache in Hibernate stores the results of queries in memory to improve performance by avoiding repeated database calls.
Query Cache is a second-level cache in Hibernate that stores the results of queries along with the query key in memory.
It helps in improving performance by avoiding repeated database calls for the same query.
Query Cache can be enabled in Hibernate configuration to cache query results.
It is useful for read-heavy applications where the same queries are exe...read more
Q54. Best practices, Issues faced and how they were mitigated
Best practices, issues faced, and their mitigation in the role of Lead Consultant
Implementing regular communication channels to ensure effective collaboration among team members
Establishing clear project goals and objectives to guide the team's efforts
Identifying and addressing potential risks and challenges proactively
Leveraging industry best practices and lessons learned from previous projects
Encouraging continuous learning and professional development within the team
Buildi...read more
Q55. what is access specifiers define access specifers
Access specifiers define the level of access to classes, methods, and variables in object-oriented programming.
Access specifiers include public, private, protected, and default.
Public access specifier allows access from any other class.
Private access specifier restricts access to only within the same class.
Protected access specifier allows access within the same package and subclasses.
Default access specifier (no keyword) restricts access to only within the same package.
Q56. Deferred Revenue how you recognize the same
Deferred revenue is recognized when the performance obligation is satisfied.
Deferred revenue is recognized when the performance obligation is satisfied.
It is recognized as revenue in the income statement.
It is initially recorded as a liability on the balance sheet.
Deferred revenue arises when a company receives payment for goods or services that have not yet been provided.
Examples include subscription services, prepaid rent, and gift cards.
Q57. What init used in python Sudo program on ascending order of list items as given
The init used in Python is __init__ which is a constructor method for initializing objects.
The __init__ method is called automatically when an object is created.
It takes self as the first parameter and can take additional parameters for initialization.
Example: class Car: def __init__(self, make, model): self.make = make self.model = model
In the above example, the __init__ method initializes the make and model attributes of the Car object.
Q58. trigger on opportunity to calculate sum child to parent event communication child parent LWC wire method Integration rest api
Use LWC wire method to trigger event communication from child to parent and calculate sum
Create a custom event in the child component to pass data to the parent component
Use @wire method in the parent component to listen for the custom event and calculate the sum
Integrate with a REST API to fetch additional data if needed
Q59. How do you approach performance tuning of a stored procedure?
I approach performance tuning of a stored procedure by analyzing query execution plans, optimizing indexes, and rewriting inefficient code.
Analyze query execution plans to identify bottlenecks
Optimize indexes to improve data retrieval speed
Rewrite inefficient code to reduce unnecessary processing
Consider parameter sniffing and data distribution for optimal performance
Q60. How do you manage stakeholders or business? How do you gather requirements?
I manage stakeholders by building relationships and understanding their needs. I gather requirements through active listening and documentation.
Identify key stakeholders and their needs
Build relationships and establish trust
Actively listen to their requirements and concerns
Document requirements and communicate changes
Manage expectations and provide regular updates
Use tools such as surveys, interviews, and workshops to gather requirements
Ensure requirements are aligned with bu...read more
Q61. 2)what is the difference between remove and delete?
Q62. How can design thinking be used in making a digital product?
Design thinking can be used in making a digital product by focusing on user needs, prototyping, and iterating based on feedback.
Start by empathizing with the users to understand their needs and pain points
Define the problem statement and ideate potential solutions
Create prototypes to test and gather feedback from users
Iterate on the design based on feedback to improve user experience
Collaborate with cross-functional teams to ensure the product meets both user and business goa...read more
Q63. Can you emphasize more about your advanced MS Excel using dashboards?
I have extensive experience creating advanced MS Excel dashboards using various functions and features.
I have created dynamic dashboards using pivot tables, slicers, and conditional formatting.
I am proficient in using advanced functions such as VLOOKUP, INDEX-MATCH, and SUMIFS to extract and analyze data.
I have experience in creating interactive charts and graphs to visualize data trends and insights.
I have developed automated reports using macros and VBA to streamline data p...read more
Q64. What do you know about Spark architecture?
Spark architecture is based on a master-slave architecture with a cluster manager to coordinate tasks.
Spark architecture consists of a driver program that communicates with a cluster manager to coordinate tasks.
The cluster manager allocates resources and schedules tasks on worker nodes.
Worker nodes execute the tasks and return results to the driver program.
Spark supports various cluster managers like YARN, Mesos, and standalone mode.
Spark applications can run in standalone mo...read more
Q65. what performance metrics are used in Machine Learning?
Performance metrics in Machine Learning measure the effectiveness and efficiency of models.
Accuracy: measures the proportion of correct predictions out of the total predictions made by the model.
Precision: measures the proportion of true positive predictions out of all positive predictions made by the model.
Recall: measures the proportion of true positive predictions out of all actual positive instances in the dataset.
F1 Score: a combination of precision and recall, providing...read more
Q66. What is the difference between the reduceBy and groupBy transformations in Apache Spark?
reduceBy is used to aggregate data based on key, while groupBy is used to group data based on key.
reduceBy is a transformation that combines the values of each key using an associative function and a neutral 'zero value'.
groupBy is a transformation that groups the data based on a key and returns a grouped data set.
reduceBy is more efficient for aggregating data as it reduces the data before shuffling, while groupBy shuffles all the data before grouping.
reduceBy is typically u...read more
Q67. What is the difference between RDD (Resilient Distributed Datasets) and DataFrame in Apache Spark?
RDD is a low-level abstraction representing a distributed collection of objects, while DataFrame is a higher-level abstraction representing a distributed collection of data organized into named columns.
RDD is more suitable for unstructured data and low-level transformations, while DataFrame is more suitable for structured data and high-level abstractions.
DataFrames provide optimizations like query optimization and code generation, while RDDs do not.
DataFrames support SQL quer...read more
Q68. Which in most efficient sorting algorithm amd why and what is it's time complexity.
The most efficient sorting algorithm is Quick Sort due to its average time complexity of O(n log n).
Quick Sort is efficient due to its divide and conquer approach.
It has an average time complexity of O(n log n) and a worst-case time complexity of O(n^2).
Example: Sorting an array of integers using Quick Sort.
Q69. how manual sharing works and how to see manually shared rercords
Manual sharing allows users to manually grant access to records. To see manually shared records, use the 'Sharing' button on the record detail page.
Manual sharing is a feature in Salesforce that allows users to manually grant access to records.
It is useful when users need to share specific records with other users or groups.
To manually share a record, users can click on the 'Sharing' button on the record detail page.
From there, they can add individual users or groups and spec...read more
Q70. what are oops concept what is encapsulation what is dbms
OOPs concepts are principles in object-oriented programming, encapsulation is the bundling of data and methods within a class, and DBMS stands for Database Management System.
OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction
Encapsulation is the concept of bundling data and methods that operate on the data within a single unit, such as a class
DBMS is a software system that manages databases, allowing users to interact with the data stored in them
Ex...read more
Q71. what are closures and higher order components,life cycle methods etc
Closures are functions that have access to their own scope, higher order components are functions that take other functions as arguments, and life cycle methods are methods that are called at certain points in a component's life cycle.
Closures are functions that can access variables from their outer scope even after the outer function has finished executing.
Higher order components are functions that take other components as arguments and return a new component.
Life cycle meth...read more
Q72. Is a string mutable/immutable with an example
A string can be both mutable and immutable depending on the programming language.
In languages like Java and Python, strings are immutable.
In languages like C++ and C#, strings are mutable.
Immutable strings cannot be modified once created, while mutable strings can be modified.
Example of immutable string: 'hello world'.replace('o', '0') returns 'hell0 w0rld'.
Example of mutable string: string s = 'hello'; s[0] = 'j'; s now becomes 'jello'.
Q73. Diff between function and stored procedure Define abstraction and encapsulation Oops concepts in detail
A function is a block of code that performs a specific task, while a stored procedure is a named group of SQL statements.
Functions are used to return a single value, while stored procedures can return multiple values.
Functions can be called from within SQL statements, while stored procedures are called using their name.
Functions are typically used for calculations or data manipulation, while stored procedures are used for complex tasks or business logic.
Functions are defined ...read more
Q74. difference between truncate and drop
Truncate and drop are SQL commands used to remove data from a table.
Truncate removes all data from a table but keeps the structure intact.
Drop removes the entire table and its structure.
Truncate is faster than drop as it only removes data.
Drop cannot be undone while truncate can be rolled back.
Truncate resets the identity of the table while drop does not.
Examples: TRUNCATE TABLE table_name; DROP TABLE table_name;
Q75. How to use current page's Id in LWC
To use current page Id in LWC, we can import '@salesforce/apex' and call Apex method to get the Id.
Import '@salesforce/apex' in LWC JS file
Create an Apex method to return current page Id
Call the Apex method in LWC JS file using '@wire'
Access the current page Id in LWC HTML file using '{pageId}'
Q76. How does cyber ark tool manage password management for privilege functional Ids
CyberArk tool manages password management for privilege functional Ids by securely storing, rotating, and controlling access to credentials.
CyberArk stores privileged account credentials in a secure vault
It automatically rotates passwords to reduce the risk of unauthorized access
Access to passwords is controlled through policies and workflows
It provides auditing and reporting capabilities for privileged account usage
Integration with Active Directory and other systems for seam...read more
Q77. How do you onboard static privilege accounts in to cyber ark to automate the password management
Static privilege accounts can be onboarded into CyberArk for automated password management by following these steps.
Identify the static privilege accounts that need to be onboarded into CyberArk.
Create a Safe in CyberArk to store the passwords for these accounts.
Define the policies and permissions for accessing and managing these accounts within CyberArk.
Use CyberArk's REST API or CLI to automate the onboarding process by importing the account details and setting up password ...read more
Q78. Journal entries for Prepaid Accruals Depreciation with accumulated depreciation concept Provision for Bad debts DTA and DTL
Explanation of journal entries for Prepaid, Accruals, Depreciation, Provision for Bad debts, DTA, and DTL.
Prepaid expenses are initially recorded as assets and then expensed over time as they are used up.
Accruals are expenses incurred but not yet paid or revenue earned but not yet received.
Depreciation is the allocation of the cost of a fixed asset over its useful life, with accumulated depreciation representing the total depreciation expense to date.
Provision for bad debts i...read more
Q79. how to convert vb to fb
VB to FB conversion involves rewriting Visual Basic code into Facebook's programming language.
Identify the functionality and logic of the VB code
Rewrite the code using Facebook's programming language syntax
Test the converted code to ensure it functions correctly
Q80. what is the adb devices command and when we are use it
adb devices command is used to list all Android devices connected to a computer via USB debugging
Used to check the list of Android devices connected to the computer for debugging purposes
Helps in identifying the device ID and status (offline, online, unauthorized)
Commonly used in Android development for testing and debugging
Example: 'adb devices' command will display a list of connected devices with their respective status
Q81. What are dependency we added in POM.xml file for mobile automation
We added dependencies like Appium, TestNG, Selenium, and Apache POI in POM.xml for mobile automation.
Appium dependency for mobile automation testing
TestNG dependency for test execution and reporting
Selenium dependency for web automation
Apache POI dependency for reading and writing Excel files
Q82. What is PySpark, and can you explain its features and uses?
PySpark is a Python API for Apache Spark, used for big data processing and analytics.
PySpark is a Python API for Apache Spark, a fast and general-purpose cluster computing system.
It allows for easy integration with Python libraries and provides high-level APIs in Python.
PySpark can be used for processing large datasets, machine learning, real-time data streaming, and more.
It supports various data sources such as HDFS, Apache Hive, JSON, Parquet, and more.
PySpark is widely use...read more
Q83. Different between if loop and while loop Types of pointers
If loop is used for conditional execution while while loop is used for repetitive execution.
If loop executes the code block only if the condition is true, while loop executes the code block repeatedly until the condition becomes false.
If loop is used when the number of iterations is known, while loop is used when the number of iterations is unknown.
Example of if loop: if(x > 0) { //code block }
Example of while loop: while(x > 0) { //code block }
Q84. What are object oriented programming language and all..?
Object-oriented programming languages are based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
Objects are instances of classes, which define the structure and behavior of the objects.
Encapsulation is a key feature, where data is hidden within objects and can only be accessed through methods.
Inheritance allows classes to inherit attributes and methods from other classes.
Polymorphism enables objects to be treated as i...read more
Q85. Tell us what you can see on the drawing, identify anything
The drawing shows a mechanical assembly with various components and dimensions.
Identify different parts such as gears, shafts, bearings, etc.
Note any dimensions or tolerances specified on the drawing.
Check for any annotations or symbols indicating specific features or requirements.
Q86. How can that data be leveraged against competitors?
Data can be leveraged against competitors by identifying trends, making informed decisions, and improving strategies.
Analyzing customer behavior to identify preferences and trends
Utilizing market research data to make informed decisions on pricing and product offerings
Benchmarking performance metrics against competitors to identify areas for improvement
Implementing data-driven strategies to stay ahead of competitors
Leveraging data analytics tools to gain insights and make str...read more
Q87. What are the different modes of execution in Apache Spark?
The different modes of execution in Apache Spark include local mode, standalone mode, YARN mode, and Mesos mode.
Local mode: Spark runs on a single machine with one executor.
Standalone mode: Spark runs on a cluster managed by a standalone cluster manager.
YARN mode: Spark runs on a Hadoop cluster using YARN as the resource manager.
Mesos mode: Spark runs on a Mesos cluster with Mesos as the resource manager.
Q88. coding question to remove duplicate , count frequencies of occurrence of characters
Remove duplicates and count frequencies of characters in an array of strings.
Iterate through each string in the array
Use a hashmap to store characters and their frequencies
Remove duplicates by checking if character already exists in hashmap
Q89. When to use GET, POST, PUT, DELETE (Rest methods)
GET for retrieving data, POST for creating data, PUT for updating data, DELETE for deleting data
GET: Used to retrieve data from a server
POST: Used to create new data on a server
PUT: Used to update existing data on a server
DELETE: Used to delete data on a server
Example: GET request to fetch user information, POST request to create a new user, PUT request to update user details, DELETE request to delete a user
Q90. How to improve test coverage of a class.
To improve test coverage of a class, write more test cases to cover all possible scenarios.
Identify uncovered lines of code using a code coverage tool
Write test cases for each uncovered line of code
Write test cases for boundary conditions and edge cases
Use mock objects to simulate dependencies
Refactor code to make it more testable
Q91. What is difference between union and union all
UNION combines the result sets of two or more SELECT statements, while UNION ALL does the same but includes duplicate rows.
UNION removes duplicate rows from the result set, while UNION ALL includes all rows
UNION is slower than UNION ALL because it has to perform a distinct operation
UNION requires that all SELECT statements have the same number of columns with compatible data types
Q92. How to access the api deployed behind the vpc
To access the API deployed behind the VPC, you can set up a VPN connection or use a bastion host.
Set up a VPN connection to the VPC to securely access the API
Use a bastion host as a jump server to access the API
Ensure proper security group and network ACL configurations to allow access to the API from specific IP addresses
Q93. What are the Linux command you use in daily routines
I use commands like ls, cd, grep, and chmod in my daily routines on Linux.
ls - list directory contents
cd - change directory
grep - search for specific patterns in files
chmod - change file permissions
Q94. Types of matching in tmap, and difference b/w tmap and tunite
TMAP has three types of matching: exact, fuzzy, and partial. TUNITE is used for merging data from multiple sources.
TMAP has exact, fuzzy, and partial matching options for data mapping
Exact matching requires exact match of values in source and target
Fuzzy matching allows for some variation in values, such as spelling errors
Partial matching matches based on a percentage of similarity between values
TUNITE is used for merging data from multiple sources into a single output
TUNITE ...read more
Q95. write trigger on opportunity to sum of total opps and populate on account sumofopps field
Write a trigger on Opportunity to calculate the sum of total opportunities and populate it on the Account's 'SumOfOpps' field.
Create a trigger on the Opportunity object
Use an aggregate query to calculate the sum of the 'Amount' field on all related Opportunities
Update the 'SumOfOpps' field on the related Account with the calculated sum
Q96. What is the difference between props and state in React?
Props are immutable data passed from parent to child components, while state is mutable data managed within a component.
Props are read-only and cannot be modified by the component receiving them.
State is mutable and can be changed by the component that owns it.
Props are used to pass data from parent to child components, while state is used for managing component-specific data.
Example: Props can be used to pass a user's name to a child component, while state can be used to tra...read more
Q97. What are the uses of useCallback and useMemo in React?
useCallback is used to memoize functions and prevent unnecessary re-renders. useMemo is used to memoize values and prevent unnecessary calculations.
useCallback is used to optimize performance by memoizing functions that don't need to be recreated on every render.
useMemo is used to optimize performance by memoizing values that are expensive to calculate and don't need to be recalculated on every render.
Both useCallback and useMemo accept a dependency array as a second argument...read more
Spring Boot is a framework that simplifies the development of Java applications by providing pre-configured settings and tools.
Spring Boot eliminates the need for manual configuration by providing defaults for most settings.
It includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to run applications.
Spring Boot also offers production-ready features like metrics, health checks, and externalized configuration.
It allows developers to quickly build and deploy ...read more
Q99. Find the 2nd largest element in an array with O(n) time complexity
Use a single pass algorithm to find the 2nd largest element in an array.
Iterate through the array and keep track of the largest and second largest elements.
Initialize two variables to store the largest and second largest elements.
Compare each element with the largest and second largest elements and update accordingly.
Return the second largest element at the end of the iteration.
Q100. SQL error codes and their meanings
SQL error codes are numerical codes that indicate the type of error that occurred during SQL operations.
SQL error code 1062: Duplicate entry error
SQL error code 1045: Access denied error
SQL error code 1216: Foreign key constraint violation
More about working at Virtusa Consulting Services
Top HR Questions asked in Quadrant Consumer Products
Interview Process at Quadrant Consumer Products
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month