Comviva Technology
40+ Gujarat Ambuja Exports Interview Questions and Answers
Q1. Trapping Rainwater Problem Statement
You are given an array ARR
of long type, which represents an elevation map where ARR[i]
denotes the elevation of the ith
bar. Calculate the total amount of rainwater that ca...read more
Calculate the total amount of rainwater that can be trapped within given elevation map.
Iterate through the array to find the maximum height on the left and right of each bar.
Calculate the amount of water that can be trapped above each bar by taking the minimum of the maximum heights on the left and right.
Sum up the trapped water above each bar to get the total trapped water for the elevation map.
Q2. Merge Sort Task
Given a sequence of numbers, denoted as ARR
, your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
Example:
Explanation:
The Merge Sort algorith...read more
Implement Merge Sort algorithm to sort a sequence of numbers in non-descending order.
Divide the input array into two halves recursively until each part has a size of '1'.
Merge the sorted arrays to return one fully sorted array.
Time complexity of Merge Sort is O(n log n).
Q3. Count Nodes within K-Distance Problem Statement
Given a connected, undirected, and acyclic graph where some nodes are marked and a positive integer 'K'. Your task is to return the count of nodes such that the d...read more
Count nodes within K-distance from marked nodes in a connected, undirected, acyclic graph.
Create an adjacency list to represent the graph.
Use BFS to traverse the graph and calculate distances from marked nodes.
Keep track of visited nodes and distances to avoid revisiting nodes.
Return the count of nodes with distances less than 'K' from all marked nodes.
Handle edge cases like empty graph or marked nodes.
Q4. Ways To Make Coin Change
Given an infinite supply of coins of each denomination from a list, determine the total number of distinct ways to make a change for a specified value. If making the change isn't possib...read more
Given coin denominations and a target value, find the total number of ways to make change.
Use dynamic programming to keep track of the number of ways to make change for each value up to the target value.
Iterate through each denomination and update the number of ways to make change for each value.
Handle base cases such as making change for 0 value.
Consider all possible combinations of denominations to make change for the target value.
Q5. What is inheritance? Show me by a code that shouldn't be a pseudo code but can be in any language
Inheritance is a mechanism in OOP where a new class is derived from an existing class.
Allows for code reusability and saves time
Derived class inherits properties and methods of base class
Can override base class methods in derived class
Can have multiple levels of inheritance
Example: class Dog extends Animal {}
Q6. Count Occurrences of X in Sorted Array
Given a sorted array or list of integers with size N and an integer X, you need to determine how many times X appears in the array/list.
Input:
The first line of the input...read more
Count occurrences of a given integer in a sorted array.
Use binary search to find the first and last occurrence of X in the array.
Calculate the count by subtracting the indices of the last and first occurrences.
Handle cases where X is not present in the array.
Implement Stack with Linked List
Your task is to implement a Stack data structure using a Singly Linked List.
Explanation:
Create a class named Stack
which supports the following operations, each in O(1) time:
Implement a Stack data structure using a Singly Linked List with operations in O(1) time.
Create a class named Stack with getSize, isEmpty, push, pop, and getTop methods.
Use a Singly Linked List to store the elements of the stack.
Ensure each operation runs in O(1) time complexity.
Handle edge cases like empty stack appropriately.
Example: For input '5 3 10 5 1 2 4', the output should be '10 1 false'.
Q8. What is normalization? What do you mean by 1NF, 2NF, 3NF, 4NF?
Normalization is the process of organizing data in a database to reduce redundancy and dependency.
1NF (First Normal Form) - Each column in a table must have atomic values.
2NF (Second Normal Form) - A table must be in 1NF and all non-key attributes must be dependent on the primary key.
3NF (Third Normal Form) - A table must be in 2NF and all non-key attributes must be independent of each other.
4NF (Fourth Normal Form) - A table must be in 3NF and have no multi-valued dependenci...read more
Q9. What are framework are used in frontend and what are the layers in css and define checxbox and define tools we are using in web development and what are the tags in html and css
Frontend frameworks include React, Angular, and Vue. CSS layers include presentation, layout, and behavior. Checkbox is a form element. Web development tools include VS Code, Git, and Chrome DevTools. HTML tags include <div>, <p>, and <a>. CSS tags include .class, #id, and element selectors.
Frontend frameworks: React, Angular, Vue
CSS layers: presentation, layout, behavior
Checkbox: form element
Web development tools: VS Code, Git, Chrome DevTools
HTML tags: <div>, <p>, <a>
CSS ta...read more
Q10. find first character repeating in the string, ex : 'abcddbc' ans = 'b'
Find the first character that repeats in a given string.
Iterate through the string and keep track of characters seen so far.
If a character is already seen, return it as the first repeating character.
If no repeating character is found, return null.
Q11. 1)What is stack? 2)Overflowing condition for stack 3)What is binary tree? 4)Data structure used in DFS traversal.
A stack is a data structure that follows the Last In First Out (LIFO) principle.
Stack is a linear data structure with two main operations: push (adds an element) and pop (removes the top element).
Overflowing condition for stack occurs when trying to push an element into a full stack.
A binary tree is a hierarchical data structure where each node has at most two children.
Depth First Search (DFS) traversal uses a stack data structure to keep track of nodes to visit.
Q12. What's is functional components and class components
Functional components are stateless components in React that are defined as functions, while class components are stateful components defined as ES6 classes.
Functional components are simpler and easier to read/write compared to class components
Functional components do not have access to lifecycle methods or state, while class components do
Class components can have local state and use lifecycle methods like componentDidMount, componentDidUpdate, etc.
Functional components can b...read more
Q13. For problem solving abilities Find the frequency of each element present in the string
Count the frequency of each element in a string
Create a dictionary to store the count of each element
Iterate through the string and update the count in the dictionary
Return the dictionary with frequencies of each element
Q14. ISO-OSI model. purpose of various layers, protocols in various layers, TCP vs UDP
ISO-OSI model defines 7 layers for network communication. Each layer has specific functions and protocols.
Physical layer - transmits raw data over physical medium (e.g. Ethernet cables)
Data link layer - provides error detection and correction (e.g. MAC addresses)
Network layer - routes data packets between networks (e.g. IP addresses)
Transport layer - ensures reliable data delivery (e.g. TCP, UDP)
Session layer - manages communication sessions between applications
Presentation l...read more
Q15. How an application running in cloud with tightly coupled infrastructure can be deployed to on-premise
An application running in cloud with tightly coupled infrastructure can be deployed to on-premise by decoupling the components and using containerization.
Decouple the application components to make them more portable
Use containerization technologies like Docker to package the application and its dependencies
Deploy the containerized application to on-premise servers using tools like Kubernetes for orchestration
Q16. What is your favorite programming language
My favorite programming language is Python because of its simplicity, readability, and versatility.
Simplicity of syntax makes it easy to learn and use
Readability allows for efficient collaboration with other developers
Versatility in application across various domains such as web development, data analysis, and automation
Q17. Add a new column to the database table in production which is already having 100 million of data
Use a tool like Rails migration to add a new column to the database table in production with 100 million data.
Create a new Rails migration file to add the new column to the database table.
Test the migration locally to ensure it works as expected.
Deploy the migration to the production environment during a maintenance window to avoid downtime.
Consider using tools like ActiveRecord's `change_column` method to efficiently add the new column to a large dataset.
Q18. What to do for cost management on a cloud
For cost management on a cloud, monitor usage, optimize resources, use cost allocation tags, leverage reserved instances, and consider spot instances.
Monitor usage regularly to identify any inefficiencies or unused resources
Optimize resources by right-sizing instances and using auto-scaling
Use cost allocation tags to track spending by project or department
Leverage reserved instances for predictable workloads to save costs
Consider using spot instances for non-critical workload...read more
Q19. What is heap and stack memory
Heap and stack memory are two types of memory storage in computer systems. Heap memory is used for dynamic memory allocation, while stack memory is used for static memory allocation.
Heap memory is used for storing objects that are created at runtime and can be accessed randomly.
Stack memory is used for storing local variables and function call information.
Example: When a new object is created using 'new' keyword in Java, it is stored in heap memory. Local variables in a funct...read more
Q20. Pros and cons of micro service based application
Microservices offer scalability and flexibility but can increase complexity and require careful management.
Pros: Scalability, flexibility, independent deployment, technology diversity
Cons: Increased complexity, communication overhead, data consistency challenges
Example: Netflix uses microservices to handle millions of requests daily
Example: Amazon migrated to microservices to improve agility and scalability
Q21. What's is template and literal
A template is a pre-designed format used as a starting point for a document or file. A literal is a value that is written exactly as it is.
Template: Used as a starting point for documents or files
Literal: Value written exactly as it is
Example: Template for a resume, literal value 'Hello World'
Q22. How application security is maintained
Application security is maintained through regular security assessments, code reviews, penetration testing, and implementing security best practices.
Regular security assessments to identify vulnerabilities
Code reviews to ensure secure coding practices are followed
Penetration testing to simulate attacks and identify weaknesses
Implementing security best practices such as input validation, encryption, and access control
Using tools like firewalls, antivirus software, and intrusio...read more
Q23. All operations of Linked list , strings
Linked lists and strings are fundamental data structures used in programming for storing and manipulating data.
Linked lists are made up of nodes that contain data and a reference to the next node in the list.
Strings are sequences of characters that can be manipulated using various string functions.
Operations on linked lists include insertion, deletion, traversal, and searching.
Operations on strings include concatenation, substring extraction, comparison, and searching.
Q24. Swap 2 variables without using a third one
To swap 2 variables without using a third one, use arithmetic operations.
Add the values of both variables and store the result in one of the variables.
Subtract the value of the second variable from the sum and store the result in the second variable.
Subtract the value of the first variable from the sum and store the result in the first variable.
Q25. what is mean by smoke testing
Smoke testing is a preliminary testing to check if the software build is stable enough for further testing.
Smoke testing is a type of non-exhaustive testing
It is performed to ensure that the critical functionalities of the software are working fine
It is usually done after a new build is received
It helps in identifying the major issues early in the testing cycle
Example: Checking if the login page is working fine after a new build is received
Q26. How do you debug a stripped process
Debugging a stripped process involves using tools like GDB, analyzing memory dumps, and reverse engineering.
Use a debugger like GDB to analyze the stripped process
Analyze memory dumps to identify issues and trace the program flow
Utilize reverse engineering techniques to understand the code behavior
Look for patterns in the stripped process to identify potential bugs
Q27. Pillers of oops , explain data science, concepts of ACID
Pillars of OOPs are Inheritance, Encapsulation, Polymorphism, and Abstraction. Data science involves analyzing and interpreting complex data. ACID stands for Atomicity, Consistency, Isolation, Durability.
Pillars of OOPs: Inheritance, Encapsulation, Polymorphism, Abstraction
Data science: Analyzing and interpreting complex data to gain insights
ACID: Atomicity, Consistency, Isolation, Durability
Q28. What do you think as a BD you will do?
As a BD, I will identify new business opportunities, build relationships with potential clients, and negotiate deals.
Research and identify potential clients and markets
Develop and maintain relationships with clients and partners
Negotiate and close deals
Collaborate with internal teams to develop proposals and solutions
Stay up-to-date with industry trends and market changes
Q29. difference between regression and retesting
Regression testing is testing the entire system after changes while retesting is testing only the failed test cases.
Regression testing is done to ensure that changes made to the system do not affect the existing functionality.
Retesting is done to ensure that the defects found in the previous test cycle have been fixed.
Regression testing is done after every build while retesting is done after every defect fix.
Regression testing is time-consuming while retesting is less time-co...read more
Q30. How monitoring tool elk works
ELK is a monitoring tool that stands for Elasticsearch, Logstash, and Kibana.
ELK is a combination of three open-source tools: Elasticsearch, Logstash, and Kibana.
Elasticsearch is a search and analytics engine that stores and indexes data.
Logstash is a data processing pipeline that ingests, processes, and sends data to Elasticsearch.
Kibana is a visualization tool that allows users to interact with data stored in Elasticsearch.
ELK is commonly used for log management, monitoring...read more
Q31. semaphore from operating system
A semaphore in operating systems is a synchronization tool used to control access to shared resources.
Semaphores can be used to prevent race conditions in multi-threaded programs
They can be either binary (0 or 1) or counting (integer value)
Examples include mutex locks and counting semaphores
Q32. 5. Difference Between C and C++
Q33. Different functionality of Burpsuite.
Burpsuite is a web application security testing tool used for scanning, analyzing, and exploiting web applications.
Burpsuite can intercept and modify HTTP/S requests and responses
It can be used for scanning web applications for vulnerabilities
Burpsuite includes tools for spidering, scanning, and intruder attacks
It has a repeater tool for manually manipulating and re-sending requests
Burpsuite can be used for session handling and authentication testing
Q34. Difference Between C and C++
Q35. Explain a project end to end
Developed a predictive model to identify potential customers for a bank
Gathered and cleaned data on customer demographics, financial history, and behavior
Performed exploratory data analysis to identify patterns and correlations
Developed and trained a machine learning model using logistic regression
Evaluated model performance using metrics such as accuracy, precision, and recall
Deployed the model in a web application for use by bank employees
Q36. Validation of microservices
Validation of microservices involves ensuring that each microservice functions correctly and integrates seamlessly with other services.
Validate each microservice individually to ensure it meets its functional requirements
Test the integration between microservices to ensure seamless communication
Perform end-to-end testing to validate the entire system
Use tools like unit testing frameworks, contract testing, and service virtualization
Implement monitoring and logging to identify...read more
Q37. Exception about compensation
Compensation exceptions can be made for exceptional performance or unique circumstances.
Compensation exceptions should be rare and well-justified.
Exceptions can be made for exceptional performance, such as exceeding sales targets.
Exceptions can also be made for unique circumstances, such as a sudden increase in workload or a change in job responsibilities.
Any exceptions should be approved by upper management and documented for transparency.
Regular compensation reviews should ...read more
Q38. Explain dashboards created by u
I have created interactive dashboards using Tableau to visualize and analyze data for various projects.
Utilized Tableau to connect to data sources and create interactive visualizations
Designed dashboards with filters, drill-down capabilities, and dynamic elements
Included key performance indicators (KPIs) and trend analysis in the dashboards
Used color coding and data labels to enhance data interpretation
Shared dashboards with stakeholders for decision-making purposes
Q39. explain opps concept
OOPs concept stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.
OOPs focuses on creating objects that contain data in the form of attributes and code in the form of methods.
Encapsulation, Inheritance, Polymorphism, and Abstraction are the four main principles of OOPs.
Example: In a banking system, a 'Customer' object can have attributes like name and account number, and methods like deposit and withdraw.
Q40. Use the XOR operator
XOR operator is a logical operator that returns true if and only if both operands are different.
XOR is represented by the symbol ^
It can be used to toggle a bit (e.g. x ^= 1)
It can be used to check if two values are different (e.g. x ^ y)
It can be used to encrypt and decrypt data
It can be used to find the odd occurring element in an array
Top HR Questions asked in Gujarat Ambuja Exports
Interview Process at Gujarat Ambuja Exports
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month