GenC Next
20+ GenC Next Interview Questions and Answers
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
You have been given a square chessboard of size ‘N x N’. The position coordinates of the Knight and the position coordinates of the target are also given.
Your task is t...read more
GenC Next Interview Questions and Answers for Freshers
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
You are given an array “arr'' of integers. Your task is to find the contiguous subarray within the array which has the largest product of its elements. You have to report this maximum p...read more
You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.
Note :
1. The array consists of only ...read more
You are given an array of integers. You need to sort the array in ascending order using quick sort.
Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the arra...read more
Share interview questions and help millions of jobseekers 🌟
You are given a 'N' * 'N' maze with a rat placed at 'MAZE[0][0]'. Find and print all paths that rat can follow to reach its destination i.e. 'MAZE['N' - 1]['N' - 1]'. Rat can move in any ...read more
You are given a sorted integer array' ARR' of size 'N'. You need to remove the duplicates from the array such that each element appears only once. Return the length of this ne...read more
GenC Next Jobs
0Q9. What are the bounding methods in React? Difference between Class Component and Functional Component in ReactJS?
Bounding methods in React are used to limit the scope of a component's updates.
Bounding methods include shouldComponentUpdate, getSnapshotBeforeUpdate, and componentDidUpdate.
shouldComponentUpdate allows a component to decide if it should update based on changes in props or state.
getSnapshotBeforeUpdate allows a component to capture information before a change is made to the DOM.
componentDidUpdate is called after a component updates and can be used to perform additional actio...read more
Two water tanks contain 250 and 400 litres of water respectively. What will be the maximum capacity of a bucket that can exactly measure the water in the two tanks?
Two Dice Are Thrown Together Then The Probability That The Sum Of Numbers Appearing On Them Is A Prime Number Is?
Q12. Write a program to perform Binary search on an array of N numbers.
Program to perform Binary search on an array of N numbers.
Sort the array in ascending order
Set low and high variables to the first and last index of the array respectively
Calculate the mid index as (low+high)/2
If the element at mid index is equal to the search element, return mid
If the element at mid index is less than the search element, set low to mid+1
If the element at mid index is greater than the search element, set high to mid-1
Repeat until low is greater than high or e...read more
Q13. What are the different regularization techniques?
Regularization techniques are used to prevent overfitting in machine learning models.
L1 regularization (Lasso)
L2 regularization (Ridge)
Elastic Net regularization
Dropout regularization
Early stopping
Data augmentation
Batch normalization
Q14. What is virtual DOM and why ReactJS uses it?
Virtual DOM is a lightweight copy of the actual DOM used for efficient updates.
Virtual DOM is a concept where a lightweight copy of the actual DOM is created.
ReactJS uses it to efficiently update the UI without re-rendering the entire page.
Virtual DOM compares the previous and current states and updates only the necessary changes.
This results in faster rendering and better performance.
Example: When a user types in a search bar, only the search results are updated, not the ent...read more
Q15. Explain all the stages of creating a machine learning model on a given dataset
Creating a machine learning model involves data preparation, model selection, training, evaluation, and deployment.
Data preparation involves cleaning, transforming, and splitting the data into training and testing sets.
Model selection involves choosing the appropriate algorithm and hyperparameters for the problem.
Training the model involves feeding the training data to the algorithm and adjusting the parameters to minimize the error.
Evaluation involves testing the model on th...read more
Traveling at 3/4th of the original Speed a train is 10 minutes late. Find the usual Time taken by the train to complete the journey?
Q17. Write a program to perform Merge sort on an array of N numbers.
Program to perform Merge sort on an array of N numbers.
Divide the array into two halves recursively
Sort the two halves using merge sort
Merge the two sorted halves
Repeat until the entire array is sorted
Time complexity: O(nlogn)
Q18. What is the formula for gradient descent?
Gradient descent is an optimization algorithm used to minimize the cost function of a machine learning model.
Start with an initial guess for the model parameters
Calculate the gradient of the cost function with respect to each parameter
Update the parameters in the opposite direction of the gradient
Repeat until convergence or a maximum number of iterations is reached
Q19. What is your favourite technology?
My favorite technology is artificial intelligence.
AI has the potential to revolutionize various industries
It can automate repetitive tasks and improve efficiency
AI can also help in making better decisions by analyzing large amounts of data
Examples include chatbots, image recognition, and predictive analytics
Q20. What is poison distribution?
Poison distribution refers to the spread of toxic substances through various means.
Poison distribution can occur through intentional or accidental means.
Examples include the distribution of poison through food or water, or the release of toxic chemicals into the environment.
Poison distribution can have serious health consequences and may require immediate medical attention.
Prevention measures such as proper storage and disposal of toxic substances can help prevent poison dist...read more
Q21. What is PCA?
PCA stands for Principal Component Analysis. It is a statistical technique used for dimensionality reduction.
PCA is used to identify patterns in data and reduce the number of variables in a dataset.
It works by transforming the original variables into a new set of variables called principal components.
These principal components are ordered by the amount of variance they explain in the data.
PCA is commonly used in fields such as finance, biology, and image processing.
Example: P...read more
Q22. Explain any clustering algorithm.
Clustering algorithm groups similar data points together based on their characteristics.
Clustering is an unsupervised learning technique.
It can be used for customer segmentation, image segmentation, etc.
K-means, hierarchical clustering, and DBSCAN are popular clustering algorithms.
The choice of algorithm depends on the data and the problem at hand.
Q23. Find if the 5th bit of a number is set or cleared
To find if the 5th bit of a number is set or cleared.
Use bitwise AND operator with 0b10000 to check if the 5th bit is set or cleared.
If the result is 0, the 5th bit is cleared. If it is greater than 0, the 5th bit is set.
Example: num & 0b10000 == 0 means 5th bit is cleared in num.
Q24. Write a program to reverse your name.
A program to reverse a given name.
Create a variable to store the name
Loop through the name from the last character to the first
Add each character to a new variable
Print the reversed name
Top Interview Questions for GenC Next Related Skills
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month