
Tredence


100+ Tredence Interview Questions and Answers
Q1. Palindrome String Validation
Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.
Note:
The string 'S' should be evaluated in a case-insensi...read more
Validate if a given string is a palindrome after removing special characters, spaces, and converting to lowercase.
Remove special characters and spaces from the input string
Convert the string to lowercase
Check if the modified string is equal to its reverse to determine if it's a palindrome
Q2. Find First Repeated Character in a String
Given a string 'STR' composed of lowercase English letters, identify the character that repeats first in terms of its initial occurrence.
Example:
Input:
STR = "abccba"...read more
Find the first repeated character in a given string composed of lowercase English letters.
Iterate through the string and keep track of characters seen so far in a set.
Return the first character that is already in the set.
If no repeated character is found, return '%'.
Q3. Pair Sum Problem Statement
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Note:
Each pa...read more
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and use a hash set to store elements seen so far.
For each element, check if the complement (S - current element) is in the set.
If found, add the pair to the result list and continue.
Sort the result list based on the criteria mentioned in the problem statement.
Q4. Palindrome String Check
Given an alphabetical string S
, determine whether it is a palindrome. A palindrome is a string that reads the same backward as forward.
Input:
The first line contains an integer T
, the n...read more
Check if a given string is a palindrome or not.
Iterate through the string from both ends and compare characters.
If all characters match, the string is a palindrome.
Consider handling cases where spaces or special characters are present.
Example: 'racecar' is a palindrome, 'hello' is not.
Q5. 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.
Q6. Nth Fibonacci Problem Statement
Calculate the Nth term of the Fibonacci series, denoted as F(n), using the formula: F(n) = F(n-1) + F(n-2)
where F(1) = 1
and F(2) = 1
.
Input:
The first line of each test case co...read more
Calculate the Nth term of the Fibonacci series using a recursive formula.
Use recursion to calculate the Nth Fibonacci number by summing the previous two numbers.
Base cases are F(1) = 1 and F(2) = 1.
Handle edge cases like N = 1 separately.
Optimize the solution using memoization to avoid redundant calculations.
Ensure the input N is within the constraints 1 ≤ N ≤ 10000.
Q7. Puzzle: Given two hour glass, one measuring 4 mins and the other 7 mins, how to measure 9 mins
To measure 9 minutes using two hourglasses of 4 and 7 minutes, start both hourglasses simultaneously. When the 4-minute hourglass runs out, flip it again. When the 7-minute hourglass runs out, flip it again. When the 4-minute hourglass runs out for the third time, 9 minutes will have passed.
Start both hourglasses simultaneously
When the 4-minute hourglass runs out, flip it again
When the 7-minute hourglass runs out, flip it again
When the 4-minute hourglass runs out for the thir...read more
Q8. All Paths From Source Lead To Destination Problem Statement
In a directed graph with 'N' nodes numbered from 0 to N-1, determine whether every possible path starting from a given source node (SRC) eventually le...read more
Determine if all paths from a given source node lead to a specified destination node in a directed graph.
Check if there is at least one path from source to destination.
Ensure that nodes with no outgoing edges from source are the destination.
Verify that the number of paths from source to destination is finite.
Return True if all paths from source lead to destination, otherwise False.
It is estimated that over 800 million people use mobile phones in India.
India has a population of over 1.3 billion people.
The mobile phone penetration rate in India is around 80%.
Majority of the population use mobile phones for communication, internet access, and entertainment.
The number of mobile phone users in India is constantly increasing due to affordable smartphones and data plans.
To change data type and push data into a database, use data conversion functions and SQL queries.
Use data conversion functions like CAST or CONVERT to change data type before pushing into the database.
Write SQL INSERT or UPDATE queries to push the data into the database.
Ensure the data being pushed matches the data type of the database column to avoid errors.
Q11. Reverse String Operations Problem Statement
You are provided with a string S
and an array of integers A
of size M
. Your task is to perform M
operations on the string as specified by the indices in array A
.
The ...read more
Given a string and an array of indices, reverse substrings based on the indices to obtain the final string.
Iterate through the array of indices and reverse the substrings accordingly
Ensure the range specified by each index is non-empty
Return the final string after all operations are completed
The amount of petrol used in a city in one day varies depending on factors like population, transportation infrastructure, and fuel prices.
Petrol usage depends on the number of vehicles in the city.
Public transportation options can impact petrol consumption.
Economic factors such as fuel prices and income levels play a role in petrol usage.
Industrial activities and power generation also contribute to petrol consumption.
Environmental policies and initiatives can influence petro...read more
The minimum number of comparisons required to identify the heavier coin is 3.
Divide the 10 coins into 3 groups of 3, 3, and 4 coins.
Compare the first two groups of 3 coins each. If one group is heavier, move to the next step with that group.
Compare the 3 coins in the heavier group individually to find the heaviest coin.
Implement inventory management strategies like demand forecasting, safety stock, and efficient logistics.
Utilize demand forecasting techniques to predict future demand based on historical data and market trends.
Maintain safety stock levels to buffer against fluctuations in supply and demand.
Implement efficient logistics and supply chain management to ensure timely delivery of products to stores.
Utilize technology such as inventory management software to track inventory levels...read more
You can extract the month and year from a date column in Pandas using the dt accessor.
Use the dt accessor to access the date components
Use dt.month to extract the month and dt.year to extract the year
Example: df['date_column'].dt.month will give you the month values
Example: df['date_column'].dt.year will give you the year values
R-squared measures the goodness of fit of a regression model, while p-value indicates the significance of the relationship between the independent variable and the dependent variable.
R-squared is a measure of how well the independent variable(s) explain the variability of the dependent variable in a regression model.
A high R-squared value close to 1 indicates a good fit, meaning the model explains a large portion of the variance in the dependent variable.
The p-value in linear...read more
Q17. public static void getsum(int a,int b){System.out.println("a b method");}public static void getsum(int a,int b,int c){System.out.println("a b c method");}public static void getsum(int a,int ...b){System.out.pri...
read moreThe question is about method overloading in Java.
Method overloading allows multiple methods with the same name but different parameters.
The method to be called is determined at compile-time based on the arguments passed.
In the given code, there are three overloaded methods with the same name 'getsum'.
The first method takes two integers as arguments.
The second method takes three integers as arguments.
The third method takes one integer followed by a variable number of integers ...read more
Random Forest is an ensemble learning method that builds multiple decision trees and combines their predictions, while XGBoost is a gradient boosting algorithm that builds trees sequentially.
Random Forest builds multiple decision trees independently and combines their predictions through averaging or voting.
XGBoost builds trees sequentially, with each tree correcting errors made by the previous ones.
Random Forest is less prone to overfitting compared to XGBoost.
XGBoost is com...read more
I followed a systematic process to debug CSS code and resolve functionality issues.
Reviewed the CSS code to identify any syntax errors or typos
Checked for any conflicting styles that may be overriding the desired functionality
Used browser developer tools to inspect elements and troubleshoot layout issues
Tested different scenarios to pinpoint the exact cause of the problem
Made necessary adjustments to the CSS code to fix the functionality
Q20. output of this program public static int floating(int x){ return x*floating(x-1); } public static void main(String[] args){ floating(10); }
The program will result in a StackOverflowError due to infinite recursion.
The 'floating' method is recursively calling itself without a base case to stop the recursion.
Each recursive call multiplies the input parameter by the result of the recursive call with a decremented parameter.
This will continue indefinitely until the stack overflows and an error is thrown.
Q21. What is the difference between under fitting and over fitting. How to overcome under fitting?
Underfitting occurs when a model is too simple to capture the complexity of the data. Overfitting occurs when a model is too complex and fits the noise in the data.
Underfitting occurs when the model is not able to capture the underlying trend of the data.
Overfitting occurs when the model is too complex and fits the noise in the data.
To overcome underfitting, we can increase the complexity of the model by adding more features or increasing the degree of polynomial regression.
W...read more
Underfitting and overfitting are common problems in machine learning where the model is either too simple or too complex.
Underfitting occurs when the model is too simple to capture the underlying patterns in the data.
Overfitting occurs when the model is too complex and learns noise in the training data as if it were a pattern.
Underfitting can be addressed by increasing the model complexity or adding more features.
Overfitting can be addressed by simplifying the model, using re...read more
Q23. what is front controller from context in spring mvc?
Front controller is a design pattern used in Spring MVC to handle incoming requests and route them to appropriate handlers.
Front controller acts as a central point of control for handling requests in Spring MVC.
It receives all incoming requests and delegates them to appropriate handlers called controllers.
Front controller provides a consistent way to handle requests and perform common tasks like authentication, logging, etc.
In Spring MVC, the DispatcherServlet acts as the fro...read more
A puzzle involving 4 liters of water where you need to measure specific quantities using only a 3-liter and a 5-liter jug.
You have two jugs - one holds 3 liters and the other holds 5 liters.
The goal is to measure out exactly 4 liters of water using only these two jugs.
You can fill the jugs, empty them, and transfer water between them to achieve the desired quantity.
You can change the background color of all items in JavaScript by selecting all elements and setting their background color property.
Select all elements using document.querySelectorAll()
Loop through the selected elements and set their style.backgroundColor property
Example: document.querySelectorAll('.item').forEach(item => item.style.backgroundColor = 'blue');
Q26. How you reduce error in model Which kind of matrix used in your model How you map data
To reduce error in a model, I use techniques like cross-validation, regularization, and feature selection. I use matrices like confusion matrix and correlation matrix. Data is mapped using techniques like normalization and encoding.
Reduce error in model by using techniques like cross-validation, regularization, and feature selection
Use matrices like confusion matrix to evaluate classification models and correlation matrix to analyze relationships between variables
Map data usi...read more
Q27. Guesstimate - How will you estimate the number of bridal dresses sold in a year in x country.
Estimate the number of bridal dresses sold in a year in x country.
Research the population of x country and the average age of marriage
Find out the percentage of marriages that take place in x country
Determine the average cost of a bridal dress and the percentage of brides who buy a dress
Use industry reports and sales data from bridal dress retailers in x country
Consider seasonal trends and cultural traditions that may impact sales
Q28. What is the difference between R squared and p-value in linear regression
R squared measures the proportion of variance in the dependent variable explained by the independent variable, while p-value measures the significance of the independent variable's effect on the dependent variable.
R squared ranges from 0 to 1, with higher values indicating a better fit of the regression line to the data.
P-value measures the probability of observing a test statistic as extreme as the one computed from the sample data, assuming the null hypothesis is true.
A low...read more
Q29. 1.) Case Study: How Many people will drink tea on a certain day?
The number of people who will drink tea on a certain day can vary based on factors like weather, cultural preferences, and individual habits.
Consider factors like weather - more people may drink tea on a cold day.
Take into account cultural preferences - some cultures have a strong tea-drinking tradition.
Individual habits play a role - regular tea drinkers are more likely to consume tea daily.
Survey data or sales figures can provide insights into tea consumption patterns.
Event...read more
Q30. what is the output of this int i=0; int j=10;do{ if(i++ < --j){ } }while(i
The output of the code is 9.
The code initializes i as 0 and j as 10.
Inside the do-while loop, i is incremented by 1 and j is decremented by 1.
The loop continues until i becomes greater than or equal to j.
Since i is incremented before the comparison and j is decremented before the comparison, the loop runs 9 times.
Therefore, the output is 9.
Q31. What is confusion matrix? How do you calculate the accuracy of Random Forest?
Confusion matrix is a table used to evaluate the performance of a classification model. Accuracy of Random Forest is calculated using the confusion matrix.
Confusion matrix is a table with rows representing the actual class and columns representing the predicted class.
It helps in evaluating the performance of a classification model by showing the number of true positives, true negatives, false positives, and false negatives.
Accuracy of Random Forest can be calculated by summin...read more
Q32. The execution order of SQL Difference between where and having Difference between rank, dense rank and row Specific scenario-based queries Excel basics to intermediate
SQL execution order, where vs having, rank vs dense rank vs row, scenario-based queries, Excel basics to intermediate
SQL execution order: select, from, where, group by, having, order by
Where clause filters rows before grouping, having clause filters groups after grouping
Rank assigns unique rank to each row, dense rank assigns same rank to rows with same values, row number assigns unique number to each row
Scenario-based queries depend on specific requirements and data
Excel bas...read more
The Hourglass puzzle involves arranging a set of hourglasses to measure a specific amount of time.
Identify the different hourglasses and their corresponding time intervals.
Determine the total time needed to measure.
Start by flipping the hourglasses and keeping track of the time elapsed.
Adjust the hourglasses as needed to reach the target time.
Consider the flow of sand in each hourglass and how it affects the measurement.
The annotation for request mapping in Java is @RequestMapping.
@RequestMapping annotation is used to map web requests to specific handler methods in Spring MVC.
It can be applied at class level or method level to specify the URL path that the controller will handle.
You can also specify HTTP request methods, headers, parameters, and more using @RequestMapping.
The annotation used for a controller in Java is @RestController.
Used to define a class as a controller in Spring MVC
Automatically serializes return objects into JSON/XML responses
Equivalent to @Controller + @ResponseBody annotations
Q36. What are different optimisation techniques you have used so far in databricks
I have used techniques like hyperparameter tuning, feature engineering, and model selection in Databricks for optimization.
Hyperparameter tuning using GridSearchCV or RandomizedSearchCV
Feature engineering to create new features or transform existing ones
Model selection using techniques like cross-validation or ensemble methods
To switch out of an iframe in Selenium, you can use the switchTo().defaultContent() method.
Use driver.switchTo().defaultContent() to switch out of the iframe.
If the iframe is nested within multiple iframes, use driver.switchTo().parentFrame() to navigate up the iframe hierarchy.
You can also switch to a specific iframe by using driver.switchTo().frame() with the iframe element or index.
Q38. write the annotation for controller?
An annotation for controller in software engineering.
The annotation for controller is used to define the class as a controller in a software application.
It is typically used in frameworks like Spring MVC or ASP.NET MVC.
The annotation helps in mapping the incoming requests to the appropriate controller methods.
It can also be used to specify the URL path for the controller.
Example: @Controller in Spring MVC, [ApiController] in ASP.NET MVC
Q39. change all ul element to blue background color using jquery
Use jQuery to change the background color of all ul elements to blue.
Use the jQuery selector to select all ul elements
Use the css() method to change the background color to blue
Q40. How will you execute second notebook from first notebook?
To execute a second notebook from the first notebook, you can use the %run magic command in Jupyter Notebook.
Use the %run magic command followed by the path to the second notebook in the first notebook.
Ensure that the second notebook is in the same directory or provide the full path to the notebook.
Make sure to save any changes in the second notebook before executing it from the first notebook.
To select all div elements using jQuery, use the selector $('div').
Use the jQuery selector $('div') to select all div elements on the page.
You can also use the find() method to select div elements within a specific parent element.
To perform actions on the selected div elements, use jQuery methods like css(), text(), or addClass().
The final keyword in Java is used to define constants, prevent method overriding, and make a class immutable.
Final variables cannot be reassigned once initialized
Final methods cannot be overridden in subclasses
Final classes cannot be extended
Front Controller in Spring MVC is a design pattern that handles all requests and acts as a central point of control.
Front Controller is a servlet in Spring MVC that receives all requests and then dispatches them to the appropriate handlers.
It helps in centralizing request handling logic, improving code organization and reducing duplication.
Front Controller can perform tasks like authentication, logging, exception handling, and more before passing the request to the actual han...read more
Q44. output of this var arr=[1,2,3,4,5] arr.push(6) arr.unshift(1) arr.pop() arr.shift()
The output of the given code is [1, 2, 3, 4, 5, 6].
The 'push' method adds an element to the end of the array.
The 'unshift' method adds an element to the beginning of the array.
The 'pop' method removes the last element from the array.
The 'shift' method removes the first element from the array.
Q45. What is the significance of support, confidence and lift in market basket analysis?
Support, confidence, and lift are key metrics in market basket analysis to identify relationships between items in a transaction.
Support measures how frequently an itemset appears in the dataset.
Confidence measures the likelihood that an item B is purchased when item A is purchased.
Lift measures how much more likely item B is purchased when item A is purchased compared to when item B is purchased independently of item A.
Higher support indicates a stronger relationship between...read more
Q46. What is middleware. Write one simple middleware in Express js How we can consume API from React with Hooks Database design of any one of your existing project Service worker in JavaScript
Answers to technical questions related to software engineering
Middleware is software that connects different software applications
An example of middleware in Express js is body-parser
To consume API from React with Hooks, use the useEffect hook and fetch API
Database design should include tables, relationships, and data types
Service workers in JavaScript allow for offline functionality and caching
Q47. change first li element to yellow background color using jquery
Use jQuery to change the background color of the first li element to yellow.
Use the :first-child selector to select the first li element
Use the css() method to change the background color to yellow
Q48. what do you know about tredence youtube recommendation system - explain how it recommend videos ,factors it consider to do so mainly from resume & hobby as usual hr question
Tredence YouTube recommendation system uses algorithms to suggest videos based on user preferences and behavior.
Tredence YouTube recommendation system uses machine learning algorithms to analyze user data such as watch history, likes, and dislikes.
It considers factors like video content, user demographics, and engagement metrics to recommend relevant videos.
For example, if a user frequently watches cooking videos, the system may suggest more cooking-related content.
Tredence's...read more
Q49. 1) Making an api using node & express js 2) Showing data in ui from a server using React Hooks 3) College & School database - system design 4) Service worker
The interview question covers topics like Node.js, Express.js, React Hooks, system design, and service workers.
Create an API using Node.js and Express.js
Use React Hooks to display data from the server in the UI
Design a system for a college and school database
Implement a service worker for offline functionality
Q50. write the annotation for request mapping?
The annotation for request mapping is used to map HTTP requests to specific methods in a controller class.
The annotation is @RequestMapping
It can be used at the class level to specify a common base URL for all methods in the class
It can also be used at the method level to specify the URL path and HTTP method for a specific method
Additional attributes can be used to further customize the mapping, such as specifying request parameters or headers
Example: @RequestMapping(value = ...read more
Q51. what are the uses of final in java
The 'final' keyword in Java is used to declare constants, prevent method overriding, and ensure thread safety.
Final variables cannot be reassigned once initialized
Final methods cannot be overridden by subclasses
Final classes cannot be extended by other classes
Final parameters ensure that they cannot be modified within a method
Final fields can be used to achieve thread safety
Q52. Applications of data science in other industries. 1 guestimate and puzzel
Data science is used in various industries like finance, marketing, healthcare, and transportation to analyze trends, make predictions, and optimize processes.
Finance: Predictive analytics for stock market trends and risk assessment.
Marketing: Customer segmentation and targeted advertising campaigns.
Healthcare: Predictive modeling for disease diagnosis and treatment.
Transportation: Route optimization and demand forecasting for ride-sharing services.
Q53. What is the significance of elbow curve in clustering?
Elbow curve helps in determining the optimal number of clusters in a dataset.
Elbow curve is a plot of the number of clusters against the within-cluster sum of squares (WCSS).
The point where the rate of decrease of WCSS sharply changes is considered as the optimal number of clusters.
It helps in finding the balance between having too few or too many clusters.
For example, if the elbow point is at 3 clusters, it suggests that 3 clusters are optimal for the dataset.
Q54. 1 guestimate - Number of women in IT in India Basics of Python
It is estimated that there are around 30% women in IT in India.
According to a study by NASSCOM, women make up 34% of the IT workforce in India.
However, this percentage drops to 17% in leadership roles.
There are various initiatives and programs aimed at increasing the number of women in IT, such as Women Who Code and Girls Who Code.
The gender gap in IT is a global issue, with women being underrepresented in the industry.
Companies are recognizing the importance of diversity and...read more
Q55. What activities you have used in data factory?
I have used activities such as Copy Data, Execute Pipeline, Lookup, and Data Flow in Data Factory.
Copy Data activity is used to copy data from a source to a destination.
Execute Pipeline activity is used to trigger another pipeline within the same or different Data Factory.
Lookup activity is used to retrieve data from a specified dataset or table.
Data Flow activity is used for data transformation and processing.
Q56. like create a database of the collages composes of students and professors
Create a database to store information about colleges, students, and professors.
Create tables for colleges, students, and professors
Include columns for relevant information such as name, ID, courses, etc.
Establish relationships between the tables using foreign keys
Use SQL queries to insert, update, and retrieve data
Consider normalization to avoid data redundancy
A confusion matrix is a table that is often used to describe the performance of a classification model.
It is a matrix with rows representing the actual class and columns representing the predicted class.
It helps in evaluating the performance of a classification model by showing the number of correct and incorrect predictions.
It is commonly used in machine learning and statistics to assess the quality of a classification model.
It can provide insights into the types of errors m...read more
Q58. Find the product_id that got returned more than 10 times in a month and more than 3 times in a year?
Identify product_id with more than 10 returns in a month and 3 returns in a year.
Filter the dataset by returns in a month and returns in a year
Group the data by product_id and count the number of returns
Identify product_id with counts exceeding the thresholds
Q59. Transpose a matrix in python and machine learning questions
To transpose a matrix in Python, use numpy.transpose() or the T attribute.
Use numpy.transpose() function to transpose a matrix.
Alternatively, use the T attribute of a numpy array.
Example: np.transpose(matrix) or matrix.T
Q60. How to create a GTM plan for a telecom industry solution
Develop a GTM plan by identifying target market, messaging, channels, and sales strategy for telecom industry solution
Identify target market segments based on demographics, psychographics, and behavior
Craft messaging that highlights the unique features and benefits of the telecom solution
Select appropriate channels such as digital marketing, social media, events, and partnerships
Develop a sales strategy that includes pricing, distribution, and sales enablement tools
Measure an...read more
Q61. Describe any over Forecasting Methodology
Over Forecasting Methodology involves predicting higher values than the actual outcome.
Over forecasting can lead to excess inventory and increased costs.
It can also result in missed sales opportunities due to inaccurate predictions.
Common causes of over forecasting include relying on outdated data or not considering external factors.
For example, a company may over forecast demand for a product leading to excess stock that needs to be discounted or disposed of.
Implementing reg...read more
Q62. Difference between data lake storage and blob storage?
Data lake storage is optimized for big data analytics and can store structured, semi-structured, and unstructured data. Blob storage is for unstructured data only.
Data lake storage is designed for big data analytics and can handle structured, semi-structured, and unstructured data
Blob storage is optimized for storing unstructured data like images, videos, documents, etc.
Data lake storage allows for complex queries and analytics on diverse data types
Blob storage is more cost-e...read more
Q63. Evaluation metrics, AU ROC Curve, explain one use case
AU ROC Curve is used to evaluate the performance of classification models by measuring the trade-off between true positive rate and false positive rate.
AU ROC Curve is commonly used in binary classification problems.
It helps in comparing different models based on their ability to distinguish between classes.
The area under the ROC curve (AUROC) value closer to 1 indicates a better model performance.
For example, in healthcare, AU ROC Curve can be used to evaluate the performanc...read more
Q64. Brief overview of implementations in Salesforce
Salesforce is a CRM platform used for various implementations like sales, marketing, customer service, etc.
Sales Cloud for sales automation
Service Cloud for customer service management
Marketing Cloud for marketing automation
Community Cloud for building online communities
Einstein Analytics for data analysis
The CSS box model is a design and layout concept that defines the structure and sizing of elements on a web page.
It consists of content, padding, border, and margin around an element.
Content area is where text and images are displayed.
Padding is the space between the content and the border.
Border is the line that goes around the padding and content.
Margin is the space outside the border.
Example: div { width: 200px; padding: 20px; border: 1px solid black; margin: 10px; }
Q66. Find the customer_id with maximum number of purchases consecutively?
Customer_id with maximum consecutive purchases
Identify consecutive purchases for each customer
Track the maximum consecutive purchases and corresponding customer_id
Consider edge cases like ties or no consecutive purchases
Q67. Difference between Random forest and XG Boost
Random forest is an ensemble learning method that builds multiple decision trees and combines their outputs. XG Boost is a gradient boosting algorithm that uses decision trees as base learners.
Random forest reduces overfitting by averaging multiple decision trees.
XG Boost uses gradient boosting to improve model performance.
Random forest is less prone to overfitting than XG Boost.
XG Boost is faster and more scalable than Random forest.
Random forest is better suited for high-di...read more
Q68. When would you use Parameters and constant in m query.
Parameters are used for dynamic values that can be changed, while constants are used for fixed values in M query.
Use parameters for values that may change frequently, such as dates or file paths
Use constants for values that are fixed, such as column names or static calculations
Q69. How do you optimize your code?
Optimizing code involves identifying bottlenecks, improving algorithms, using efficient data structures, and minimizing resource usage.
Identify and eliminate bottlenecks in the code by profiling and analyzing performance.
Improve algorithms by using more efficient techniques and data structures.
Use appropriate data structures like hash maps, sets, and arrays to optimize memory usage and access times.
Minimize resource usage by reducing unnecessary computations and memory alloca...read more
Q70. Tell us about marketing for tech product?
Marketing for tech products involves creating strategies to promote and sell technology-based products to target audiences.
Identify target audience and their needs
Utilize digital marketing channels such as social media, email, and SEO
Highlight product features and benefits
Create engaging content like videos, blogs, and infographics
Utilize influencer marketing to reach tech-savvy audiences
Monitor and analyze marketing performance to make data-driven decisions
Q71. How you will remove hallucination in LLM
Hallucinations in LLM can be managed through a combination of therapy, medication, and lifestyle changes.
Therapy sessions with a psychologist or psychiatrist can help address underlying issues causing hallucinations.
Medication prescribed by a doctor, such as antipsychotics or mood stabilizers, can help reduce hallucinations.
Making lifestyle changes like getting enough sleep, reducing stress, and avoiding drugs or alcohol can also help manage hallucinations.
Support from family...read more
Q72. What is PEFT?and what is QLORA
PEFT stands for Physical Education, Fine Arts, Technology. QLORA is a software platform for managing and analyzing data.
PEFT is an acronym for Physical Education, Fine Arts, Technology, representing different areas of study or activities in education.
QLORA is a software platform used for managing and analyzing data, often used in research or business settings.
PEFT can be implemented in schools to ensure a well-rounded education for students.
QLORA can help businesses make data...read more
Q73. How to cut a cake in parts with 3 slices
Cut the cake into 3 equal parts using 2 straight cuts
Make the first cut horizontally through the middle of the cake
Make the second cut vertically through the middle of the cake, perpendicular to the first cut
Each slice will be a third of the cake
Q74. Rate yourself in sql and python
I rate myself highly in SQL and Python.
I have extensive experience in writing complex SQL queries and optimizing database performance.
I am proficient in Python and have used it for data analysis, automation, and web scraping.
I have worked on various projects where I utilized both SQL and Python together to extract, transform, and load data.
I am familiar with popular SQL databases like MySQL, PostgreSQL, and Oracle, as well as Python libraries like pandas and SQLAlchemy.
Q75. What is SQL window function?
SQL window function is used to perform calculations across a set of table rows related to the current row.
Window functions operate on a set of rows related to the current row
They can be used to calculate running totals, moving averages, rank, etc.
Examples include ROW_NUMBER(), RANK(), SUM() OVER(), etc.
Q76. write the css box model?
The CSS box model describes the layout and sizing of elements on a web page.
The box model consists of content, padding, border, and margin.
Content refers to the actual content of the element, such as text or images.
Padding is the space between the content and the border.
Border is a line that surrounds the padding and content.
Margin is the space outside the border, separating the element from other elements.
The width and height of an element are calculated by adding the conten...read more
Q77. Explaining company's expectations
Company's expectations should be clearly communicated to employees to ensure alignment and success.
Clearly outline job responsibilities and performance metrics
Provide regular feedback and opportunities for growth
Encourage open communication and collaboration within teams
Q78. Why data science interests you the most?
Data science interests me due to its ability to extract valuable insights from data and make informed decisions.
I am fascinated by the power of data to drive business strategies and improve decision-making processes.
I enjoy the challenge of analyzing complex datasets and finding patterns that can lead to actionable outcomes.
Data science allows me to combine my analytical skills with my passion for problem-solving and innovation.
I am excited about the potential of data science...read more
Q79. How to handle missing values
Handle missing values by imputation, deletion, or using algorithms that can handle missing data.
Impute missing values using mean, median, mode, or predictive modeling
Delete rows or columns with missing values if they are insignificant
Use algorithms like XGBoost, Random Forest, or LightGBM that can handle missing data
Q80. What are numpy and pandas
NumPy is a library for numerical computing in Python, while Pandas is a data manipulation and analysis tool.
NumPy provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays.
Pandas offers data structures like DataFrame for easy data manipulation and analysis, with tools for reading and writing data from various file formats.
Both libraries are commonly used in data science and machine learning ...read more
Q81. Why you move into Data Analytics
I moved into Data Analytics to leverage my analytical skills and passion for uncovering insights from data.
Passion for uncovering insights from data
Strong analytical skills
Interest in utilizing data to drive business decisions
Q82. select all div using jquery
Select all div using jQuery
Use the jQuery selector $('div') to select all div elements
This will return a jQuery object containing all the selected div elements
You can then perform operations on the selected div elements using jQuery methods
Q83. What is precision and recall
Precision and recall are metrics used in classification tasks to evaluate the performance of a model.
Precision is the ratio of correctly predicted positive observations to the total predicted positive observations.
Recall is the ratio of correctly predicted positive observations to the all observations in actual class.
Precision is about how many of the actual positive cases were correctly predicted as positive.
Recall is about how many of the positive cases were actually predic...read more
Q84. Draw Box-plot and explain its characteristics
Box-plot is a visual representation of the distribution of a dataset, showing the median, quartiles, and outliers.
Box-plot displays the median (middle line), quartiles (box), and outliers (dots or lines).
The length of the box represents the interquartile range (IQR).
Whiskers extend to the smallest and largest non-outlier data points within 1.5 times the IQR from the quartiles.
Outliers are plotted individually as dots or lines beyond the whiskers.
Box-plots are useful for compa...read more
Q85. Interpretation of logistic regression
Logistic regression is a statistical model used to predict the probability of a binary outcome based on one or more predictor variables.
Logistic regression is used when the dependent variable is binary (0/1, yes/no, true/false, etc.)
It estimates the probability that a given observation belongs to a particular category.
The output of logistic regression is a probability score between 0 and 1.
It uses the logistic function (sigmoid function) to model the relationship between the ...read more
Q86. Visualization libraries in python
Python has various visualization libraries like Matplotlib, Seaborn, Plotly, and Bokeh.
Matplotlib is a widely used library for creating static, interactive, and animated plots.
Seaborn is built on top of Matplotlib and provides a high-level interface for creating attractive and informative statistical graphics.
Plotly is great for creating interactive plots and dashboards.
Bokeh is another interactive visualization library that targets modern web browsers for presentation.
Q87. Custom reports in Salesforce
Custom reports in Salesforce allow users to create personalized reports based on specific criteria.
Custom reports can be created by selecting the desired fields, filters, and grouping criteria.
Users can also add charts, graphs, and tables to visualize the data in the report.
Custom reports can be scheduled to run at specific times and be shared with other users.
Examples of custom reports include sales performance by region, lead conversion rates, and customer satisfaction scor...read more
Q88. Predict sofas sold in a city
To predict sofas sold in a city, analyze historical sales data, consider population size, income levels, housing trends, and competitor activity.
Analyze historical sales data to identify trends and patterns
Consider the population size of the city as a potential market
Take into account income levels of residents to determine purchasing power
Analyze housing trends to understand demand for furniture
Consider competitor activity and market saturation in the city
Q89. Find unique elements in an array
Use a set to find unique elements in an array of strings
Create a set from the array to automatically remove duplicates
Convert the set back to an array to get unique elements
Example: ['apple', 'banana', 'apple', 'orange'] -> ['apple', 'banana', 'orange']
Q90. explain random forest algorithm
Random forest is an ensemble learning method that builds multiple decision trees and merges their predictions to improve accuracy.
Random forest creates multiple decision trees during training.
Each tree is built using a random subset of features and data points.
The final prediction is made by averaging the predictions of all trees (regression) or taking a majority vote (classification).
Q91. What is data bricks
Data bricks is a unified analytics platform that provides a collaborative environment for data scientists, engineers, and analysts.
Data bricks simplifies the process of building data pipelines and training machine learning models.
It allows for easy integration with various data sources and tools, such as Apache Spark and Delta Lake.
Data bricks provides a scalable and secure platform for processing big data and running analytics workloads.
It offers features like interactive no...read more
Q92. What is joins and types?
Joins are used to combine rows from two or more tables based on a related column between them.
Types of joins include inner join, left join, right join, and full outer join
Inner join returns rows when there is at least one match in both tables
Left join returns all rows from the left table and the matched rows from the right table
Right join returns all rows from the right table and the matched rows from the left table
Full outer join returns all rows when there is a match in eit...read more
Q93. Python API and it's applications
Python API is a set of protocols and tools for building software applications in Python.
Python API allows developers to access and manipulate data from external sources.
It can be used to create web applications, automate tasks, and build machine learning models.
Popular Python APIs include Flask, Django, and NumPy.
Python API can also be used for data visualization and analysis with libraries like Matplotlib and Pandas.
Q94. Use lambda function in a python code.
Lambda functions are anonymous functions in Python that can have any number of arguments but only one expression.
Lambda functions are defined using the lambda keyword.
They are commonly used with functions like map(), filter(), and reduce().
Example: double = lambda x: x * 2
Q95. Define precision, recall and f1 score.
Precision, recall, and F1 score are metrics used to evaluate the performance of classification models.
Precision is the ratio of correctly predicted positive observations to the total predicted positive observations.
Recall is the ratio of correctly predicted positive observations to the all observations in actual class.
F1 score is the harmonic mean of precision and recall, providing a balance between the two metrics.
Precision = TP / (TP + FP)
Recall = TP / (TP + FN)
F1 Score = 2...read more
Q96. Precession vs recall?
Precision measures the accuracy of positive predictions, while recall measures the ability to find all positive instances.
Precision is the ratio of correctly predicted positive observations to the total predicted positives.
Recall is the ratio of correctly predicted positive observations to all actual positives.
Precision is important when the cost of false positives is high, while recall is important when the cost of false negatives is high.
F1 score combines precision and reca...read more
Q97. What yours product management principles
My product management principles are customer-centricity, data-driven decision making, continuous iteration, and cross-functional collaboration.
Customer-centricity: Always prioritize the needs and wants of the customers when making product decisions.
Data-driven decision making: Utilize data and analytics to inform product strategy and prioritize features.
Continuous iteration: Embrace an agile approach to product development, constantly iterating and improving based on feedbac...read more
Q98. how to handle outliars
Outliers can be handled by identifying, analyzing, and either removing or transforming them in the data.
Identify outliers using statistical methods like Z-score or IQR.
Analyze the outliers to understand if they are errors or valid data points.
Remove outliers if they are errors or transform them using techniques like winsorization or log transformation.
Consider using robust statistical methods that are less sensitive to outliers.
Visualize the data to identify outliers visually...read more
Q99. What is Data Warehousing
Data warehousing is the process of collecting, storing, and managing data from various sources for analysis and reporting.
Data warehousing involves extracting data from multiple sources and consolidating it into a single repository.
It is used for creating a centralized database for analysis and reporting purposes.
Data warehousing helps in making informed business decisions by providing a comprehensive view of the organization's data.
Examples of data warehousing tools include ...read more
Q100. standardisation vs normalisation
Standardisation and normalisation are techniques used to scale and transform data in order to improve model performance.
Standardisation (Z-score normalisation) scales the data to have a mean of 0 and a standard deviation of 1.
Normalisation (Min-Max scaling) scales the data to a specific range, typically between 0 and 1.
Standardisation is less affected by outliers compared to normalisation.
Standardisation is preferred when the data follows a normal distribution, while normalis...read more
Top HR Questions asked in Tredence
Interview Process at Tredence

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

