
Kellton


40+ Kellton Interview Questions and Answers
Q1. Find All Pairs Adding Up to Target
Given an array of integers ARR
of length N
and an integer Target
, your task is to return all pairs of elements such that they add up to the Target
.
Input:
The first line conta...read more
The task is to find all pairs of elements in an array that add up to a given target.
Iterate through the array and for each element, check if the target minus the element exists in a hash set.
If it exists, add the pair to the result. If not, add the element to the hash set.
Handle cases where the same element is used twice to form a pair.
If no pair is found, return (-1, -1) for that test case.
Q2. Kth Largest Element Problem
Given an array containing N
distinct positive integers and a number K
, determine the Kth largest element in the array.
Example:
Input:
N = 6, K = 3, array = [2, 1, 5, 6, 3, 8]
Output...read more
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order and return the Kth element.
Ensure all elements in the array are distinct.
Handle multiple test cases efficiently.
Q3. Max Length of Same Indexed Subarrays Problem
Given two integer arrays A
and B
, and an integer C
, the goal is to determine the maximum possible length K
of the same indexed subarrays. The condition is that the s...read more
Find the maximum length of same indexed subarrays based on given conditions.
Iterate through the arrays to find the maximum length of same indexed subarrays.
Calculate the sum of subarrays from A and B, and check if the condition is met.
Return the maximum length that satisfies the condition.
Q4. Distinct Subsequences Problem Statement
You are given a string 'S' of length 'N' which may include duplicate alphabets. Your goal is to calculate the number of distinct subsequences in the string.
Example:
Inpu...read more
Calculate the number of distinct subsequences in a string with possible duplicates.
Iterate through the string and keep track of the count of each character.
Use dynamic programming to calculate the number of distinct subsequences.
Consider the cases where a character is included or excluded in the subsequence.
Modulo the final count by 10^9 + 7 to handle large answers.
Q5. 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 graph-based approach to find cycles in the array
Count the number of swaps needed to fix each cycle
Sum up the swaps needed for all cycles to get the total minimum swaps
Q6. Count Subsequences Problem Statement
Given an integer array ARR
of size N
, your task is to find the total number of subsequences in which all elements are equal.
Explanation:
A subsequence of an array is derive...read more
Count the total number of subsequences in which all elements are equal in an integer array.
Iterate through the array and count the frequency of each element.
Calculate the total number of subsequences for each element using the formula (frequency * (frequency + 1) / 2).
Sum up the total number of subsequences for all elements and return the result modulo 10^9 + 7.
Q7. Divide Chocolates Problem Statement
Ninja bought chocolate consisting of several chunks, and the sweetness of each chunk is represented in an array ARR
. He wants to divide the chocolate into K + 1
parts (cuts),...read more
The task is to maximize the total sweetness of the part that Ninja will get by dividing chocolates into K + 1 parts.
Iterate through all possible cuts to find the maximum sweetness Ninja can obtain.
Keep track of the minimum sweetness in each part after the cut.
Return the maximum of these minimum sweetness values as the result.
Q8. Partition to K Equal Sum Subsets Problem
Given an array of integers and a positive integer 'K', determine if it is possible to divide the array into 'K' non-empty subsets such that the sum of elements in each s...read more
The problem involves dividing an array into K subsets with equal sum.
Use backtracking to try all possible combinations of dividing the array into K subsets
Keep track of the sum of elements in each subset and check if they are equal to the target sum
Optimize by sorting the array in descending order before starting the backtracking process
Q9. Maximum Subarray Sum Problem Statement
Given an array arr
of length N
consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.
Explanation:
A sub...read more
Find the sum of the subarray with the maximum sum among all subarrays in an array of integers.
Iterate through the array and keep track of the maximum sum subarray seen so far
Use Kadane's algorithm to efficiently find the maximum subarray sum
Consider the case where all elements are negative to handle edge cases
Q10. Count Ways to Climb Stairs Problem
Given a staircase with a certain number of steps, you start at the 0th step, and your goal is to reach the Nth step. At every step, you have the option to move either one step...read more
The problem involves counting the number of distinct ways to climb a staircase with a certain number of steps by moving either one or two steps at a time.
Use dynamic programming to solve this problem efficiently.
Define a recursive function to calculate the number of ways to reach each step.
Consider base cases for 0 and 1 steps.
Use memoization to store and reuse intermediate results.
Return the final result modulo 10^9+7.
Q11. Minimum Sum in Matrix Problem Statement
You are given a 2D matrix 'ARR' of size 'N x 3' with integers, where 'N' is the number of rows. Your task is to compute the smallest sum achievable by selecting one eleme...read more
Find the smallest sum achievable by selecting one element from each row of a 2D matrix, following certain constraints.
Iterate through each row and calculate the minimum sum by selecting elements that do not violate the constraints.
Keep track of the minimum sum achieved so far.
Avoid selecting elements directly below previously selected elements.
Example: For input ARR = [[1, 2, 3], [4, 8, 6], [1, 5, 3]], the optimal selection would be 1 + 6 + 1 = 8.
Q12. Number Pattern Generation
Ninja enjoys arranging numbers and wishes to organize them into N
rows. The first row should have 1 number, the second row 2 numbers, the third row 3 numbers, and so forth, continuing ...read more
Generate number pattern in N rows with ascending order and restarting at 9.
Iterate through each row from 1 to N.
In each row, print numbers in ascending order starting from 1 and restarting at 9.
Handle the wrapping around from 9 to 1 when reaching 9 in the sequence.
Q13. Reverse the String Problem Statement
You are given a string STR
which contains alphabets, numbers, and special characters. Your task is to reverse the string.
Example:
Input:
STR = "abcde"
Output:
"edcba"
Input...read more
Reverse a given string containing alphabets, numbers, and special characters.
Iterate through the string from the end to the beginning and append each character to a new string.
Use built-in functions like reverse() or StringBuilder in languages like Python or Java for efficient reversal.
Handle special characters and numbers along with alphabets while reversing the string.
Ensure to consider the constraints provided in the problem statement for efficient implementation.
Q14. How to manage memory management in Python?
Memory management in Python involves automatic memory allocation and deallocation through garbage collection.
Python uses automatic memory management through garbage collection, so manual memory management is not required.
Use tools like memory_profiler to identify memory leaks and optimize memory usage.
Avoid creating unnecessary objects and use data structures efficiently to minimize memory usage.
Q15. Difference between select_related vs prefetch_related with example?
select_related follows foreign key relationships and retrieves related objects in a single query, while prefetch_related retrieves related objects separately to avoid performance issues.
select_related is used for accessing related objects in a single query, reducing database hits
prefetch_related is used for accessing related objects separately to avoid performance issues
select_related is more efficient for one-to-one or many-to-one relationships, while prefetch_related is bet...read more
Q16. what is tuple, clousures, delegates, notifications
Tuple is an ordered collection of elements. Closures are self-contained blocks of code. Delegates are references to functions. Notifications are a way to send messages between objects.
Tuple: Used to group multiple values together. Example: (1, 'apple', True)
Closures: Encapsulate code and capture variables. Example: { (x: Int) -> Int in return x * 2 }
Delegates: Allow one object to communicate with another. Example: UITableViewDelegate
Notifications: Broadcast messages to multip...read more
Q17. What is Sql joins, cte, Sp vs function, user defined types,
SQL joins are used to combine rows from two or more tables based on a related column between them.
SQL joins are used to retrieve data from multiple tables based on a related column.
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
CTE (Common Table Expression) is a temporary result set that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement.
Stored Procedures (SP) are precompiled SQL statements that are stored in the database an...read more
Q18. What is difference between react and angular
React is a JavaScript library for building user interfaces, while Angular is a full-fledged framework for building web applications.
React is a library, while Angular is a framework
React uses a virtual DOM, while Angular uses a real DOM
React is more lightweight and flexible, while Angular has more built-in features and tools
React is easier to learn for beginners, while Angular has a steeper learning curve
React is maintained by Facebook, while Angular is maintained by Google
Q19. Difference between Async , Sync and multithread?
Async is non-blocking, Sync is blocking, Multithread allows multiple threads to run concurrently.
Async allows the program to continue executing other tasks while waiting for a response, commonly used in web development with AJAX calls.
Sync blocks the program until a task is completed, commonly used in simple sequential programs.
Multithreading allows multiple threads to run concurrently, improving performance by utilizing multiple CPU cores, commonly used in applications with ...read more
Q20. What is decorater write example?
Decorator is a design pattern in software development that allows behavior to be added to individual objects, either statically or dynamically.
Decorators are used to modify the behavior of functions or classes without changing their source code.
In Python, decorators are implemented using the @ symbol followed by the decorator function name.
Example: @decorator_function def some_function(): # function implementation
Decorators can be used for logging, authentication, caching, et...read more
Q21. How single design patterns work?
Single design patterns work by providing a reusable solution to common problems in software development.
Design patterns help in organizing code and making it more maintainable.
They promote code reusability and flexibility.
Examples of single design patterns include Singleton, Factory, and Observer.
Q22. what is mvvm how to use in project
MVVM is a software architectural pattern that separates the user interface from the business logic and data.
MVVM stands for Model-View-ViewModel
Model represents the data and business logic
View represents the user interface
ViewModel acts as a mediator between the Model and View
ViewModel exposes data and commands to the View
MVVM promotes separation of concerns and testability
Example: Using MVVM in a mobile app, the ViewModel would handle data retrieval and manipulation, while t...read more
Q23. How to revert last commit?
Use 'git revert' command to revert the last commit.
Use 'git log' to find the commit hash of the last commit
Run 'git revert
' to revert the last commit Commit the revert changes with a new commit message
Q24. How to optimise query?
Optimizing query involves indexing, minimizing data retrieval, using proper joins, and avoiding unnecessary functions.
Use indexes on columns frequently used in WHERE clauses
Minimize data retrieval by selecting only necessary columns
Use proper joins (INNER JOIN, LEFT JOIN, etc.) instead of subqueries
Avoid unnecessary functions in WHERE clauses
Q25. What is normalisation?
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization is used to eliminate redundant data and ensure data dependencies are logical.
It involves dividing a database into two or more tables and defining relationships between them.
Normalization helps in reducing data redundancy, improving data integrity, and making data maintenance easier.
There are different normal forms such as 1NF, 2NF, 3NF, BCNF, and 4NF, ea...read more
Q26. How to increase performance?
To increase performance, optimize code, use efficient algorithms, parallel processing, caching, and database indexing.
Optimize code by reducing unnecessary loops and improving data structures
Use efficient algorithms like binary search instead of linear search
Implement parallel processing to utilize multiple CPU cores
Utilize caching to store frequently accessed data for faster retrieval
Implement database indexing to speed up query performance
Q27. How to secure your API’s?
Securing APIs involves using authentication, authorization, encryption, and monitoring.
Implement authentication mechanisms such as OAuth, JWT, or API keys to verify the identity of clients accessing the API.
Use authorization to control access to different parts of the API based on roles and permissions.
Encrypt data transmitted between clients and the API using HTTPS to prevent eavesdropping.
Implement rate limiting and monitoring to detect and prevent malicious activities like...read more
Q28. what is setState in stateful widget?
setState is a method used in stateful widgets to update the state of the widget and trigger a rebuild of the UI.
setState is called with a callback function that updates the state variables.
The callback function is executed asynchronously.
The new state values are merged with the old state values.
The widget is rebuilt with the updated state values.
Q29. Ado. Net & entity frework difference
ADO.NET is a data access technology while Entity Framework is an ORM framework for data access in .NET applications.
ADO.NET is a set of classes used to interact with data sources like databases directly.
Entity Framework is an ORM framework that allows developers to work with data in terms of objects and classes.
ADO.NET requires writing SQL queries manually, while Entity Framework allows querying data using LINQ.
Entity Framework provides automatic generation of SQL queries bas...read more
Q30. what is micro-frontend? what is its architecture?
Micro-frontend is an architectural style where a frontend application is broken down into smaller, independent 'micro-applications'.
Each micro-frontend is responsible for a specific feature or functionality
Micro-frontends can be developed, tested, and deployed independently
They can communicate with each other through APIs or events
Common frameworks for implementing micro-frontends include single-spa, Webpack Module Federation, and Module Federation Plugin
Q31. What is an array, define with an example?
An array is a collection of similar data types stored in contiguous memory locations.
Arrays can be of fixed size or dynamic size
Elements in an array can be accessed using their index
Example: int arr[5] = {1, 2, 3, 4, 5};
The above array has 5 elements of type int
Q32. Difference between stateless and stateful widget.
Stateless widgets are immutable and don't change over time. Stateful widgets can change their state over time.
Stateless widgets are used for displaying static content.
Stateful widgets are used for displaying dynamic content.
Stateless widgets are faster and consume less memory than stateful widgets.
Stateful widgets have a State object that stores mutable state.
Examples of stateless widgets include Text, Icon, and Image.
Examples of stateful widgets include Checkbox, Radio, and ...read more
Q33. What is oops concept why is used
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Inheritance: Allowing a class to inherit properties and behavior from another class.
Polymorphism: The ability of different classes to be treated as instances of the same class through a common interface.
Abstraction: Hidin...read more
Q34. Let me know email marketing tools you are expert in
I am an expert in various email marketing tools such as Mailchimp, HubSpot, and Constant Contact.
Proficient in creating and managing email campaigns using Mailchimp, HubSpot, and Constant Contact
Adept in designing visually appealing email templates and newsletters
Experienced in analyzing email campaign performance and optimizing for better results
Skilled in segmenting email lists and personalizing email content for targeted audiences
Q35. Why inheritance used in projects
Inheritance is used in projects to promote code reusability, reduce redundancy, and improve maintainability.
Inheritance allows for the creation of a hierarchy of classes where common attributes and methods can be defined in a base class and inherited by subclasses.
It helps in promoting code reusability by allowing subclasses to inherit properties and methods from a base class, reducing redundancy in code.
Inheritance also helps in improving maintainability as changes made to t...read more
Q36. what is enterprise architecture?
Enterprise architecture is a holistic approach to aligning an organization's business processes and IT infrastructure.
It involves creating a blueprint of the organization's current and future state in terms of technology and processes.
It helps in optimizing operations, reducing costs, and improving efficiency.
Enterprise architecture frameworks like TOGAF and Zachman provide guidelines for creating and implementing architectures.
Examples include defining standardized technolog...read more
Q37. Tell me tools used for data extraction
Tools for data extraction include web scrapers, APIs, and data mining software.
Web scrapers like Scrapy and BeautifulSoup extract data from websites
APIs like Google Maps API and Twitter API provide access to specific data
Data mining software like RapidMiner and KNIME analyze large datasets
OCR software like Tesseract can extract text from images
Database management systems like MySQL and Oracle can extract data from databases
Q38. Lifecycle of stateful widget.
Stateful widget goes through various stages during its lifecycle.
Stateful widget is created using createState() method.
When the widget is inserted into the widget tree, initState() method is called.
When the widget is updated, didUpdateWidget() method is called.
When the widget is removed from the widget tree, dispose() method is called.
build() method is called whenever the widget needs to be rebuilt.
Q39. Different ways to find element in web
Different ways to find element in web include using locators like ID, class, XPath, CSS selector, and link text.
Using ID locator: driver.findElement(By.id("elementID"));
Using class locator: driver.findElement(By.className("elementClass"));
Using XPath locator: driver.findElement(By.xpath("//xpathExpression"));
Using CSS selector locator: driver.findElement(By.cssSelector("cssSelectorExpression"));
Using link text locator: driver.findElement(By.linkText("linkText"));
Q40. Code to write the screenshot of web
Use Selenium WebDriver to capture a screenshot of a web page
Instantiate a WebDriver object for the desired browser
Navigate to the desired web page using the get() method
Use the getScreenshotAs() method to capture the screenshot and save it to a file
Q41. how to design microservices?
Designing microservices involves breaking down a large application into smaller, independent services that communicate with each other.
Identify the boundaries of each microservice based on business capabilities
Use lightweight protocols like HTTP/REST or messaging queues for communication
Implement fault tolerance and scalability by using containerization and orchestration tools like Docker and Kubernetes
Decentralize data management to avoid dependencies between services
Monitor...read more
Q42. What is test strategy
Test strategy is a high-level plan to achieve testing objectives and goals.
Test strategy outlines the approach to be taken for testing a particular system or application.
It includes the scope of testing, resources, timelines, and risks involved.
Test strategy helps in defining the testing methodologies, tools, and techniques to be used.
It also defines the entry and exit criteria for testing phases.
Example: A test strategy for a web application may include testing on different ...read more
Q43. What is your Expected ctc
My expected CTC is based on my experience, skills, and the market rate for Senior QA Analyst roles.
My expected CTC is in line with industry standards for Senior QA Analyst positions.
I have taken into consideration my years of experience and expertise in QA testing.
I am open to negotiation based on the overall compensation package offered by the company.
Q44. D/f b/w Put and Patch method in API?
Put method is used to create or update a resource, while Patch method is used to update a resource partially.
Put method is idempotent, meaning multiple identical requests will have the same effect as a single request.
Patch method is not necessarily idempotent, as multiple identical requests may have different effects.
Put method requires the client to send the entire resource representation in the request body.
Patch method only requires the client to send the specific changes ...read more
Q45. D/f b/w regression and retesting?
Regression testing is done to ensure that new code changes have not adversely affected existing functionality, while retesting is done to verify that a specific bug has been fixed.
Regression testing is performed after code changes to ensure that existing functionality still works as expected.
Retesting is performed to verify that a specific bug has been fixed.
Regression testing is broader in scope and covers multiple functionalities, while retesting is focused on a specific is...read more
Top HR Questions asked in Kellton
Interview Process at Kellton

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

