Coding Interview ⛥
1.5K subscribers
115 photos
215 files
30 links
This channel contains the free resources and solution of coding problems which are usually asked in the interviews.
Download Telegram
Date: 12-04-2025
Company name: Flipkart
Role: Data Scientist

01. What are Support Vectors in SVM?

Answer-  Support Vector Machine (SVM) is an algorithm that tries to fit a line (or plane or hyperplane) between the different classes that maximizes the distance from the line to the points of the classes.

In this way, it tries to find a robust separation between the classes. The Support Vectors are the points of the edge of the dividing hyperplane.

02. Explain Correlation and Covariance?

Answer- Covariance signifies the direction of the linear relationship between two variables, whereas correlation indicates both the direction and strength of the linear relationship between variables.

03. What is P-value?

Answer-  P-values are used to make a decision about a hypothesis test. P-value is the minimum significant level at which you can reject the null hypothesis. The lower the p-value, the more likely you reject the null hypothesis.

04.  Does Random Forest need Pruning? Why or why not?

Answer-

(a) Pruning is a data compression technique in machine learning and search algorithms that reduces the size of decision trees by removing sections of the tree that are non-critical and redundant to classify instances.

(b) Random Forest usually does not require pruning because it will not over-fit like a single decision tree. This happens due to the fact that the trees are bootstrapped and that multiple random trees use random features so the individual trees are strong without being correlated with each other.

————————————————————


Stay Safe & Happy Learning 💙
DevOps Tech Stack
Date: 09-05-2025
Company name: Tredence
Role: Data Scientist

01. What is the exploding gradient problem while using the back propagation technique?

Answer:  When large error gradients accumulate and result in large changes in the neural network weights during training, it is called the exploding gradient problem. The values of weights can become so large as to overflow and result in NaN values. This makes the model unstable and the learning of the model to stall just like the vanishing gradient problem. This is one of the most commonly asked interview questions on machine learning.

02. What do you mean by Associative Rule Mining (ARM)?

Answer- Associative Rule Mining is one of the techniques to discover patterns in data like features (dimensions) which occur together and features (dimensions) which are correlated. It is mostly used in Market-based Analysis to find how frequently an itemset occurs in a transaction. Association rules have to satisfy minimum support and minimum confidence at the very same time.

03. What is the primary difference between R square and adjusted R square?

Answer- In linear regression, you use both these values for model validation. However, there is a clear distinction between the two. R square accounts for the variation of all independent variables on the dependent variable. In other words, it considers each independent variable for explaining the variation. In the case of Adjusted R square, it accounts for the significant variables alone for indicating the percentage of variation in the model. By significant, we refer to the P values less than 0.05.

04. What are hard margin and soft Margin SVMs?

Answer-  Hard margin SVMs work only if the data is linearly separable and these types of SVMs are quite sensitive to the outliers. But our main objective is to find a good balance between keeping the margins as large as possible and limiting the margin violation i.e. instances that end up in the middle of margin or even on the wrong side, and this method is called soft margin SVM.

————————————————————



Stay Safe & Happy Learning 💙
Data Lake vs Data Warehouse
1
SQL Cheatsheet 📝

This SQL cheatsheet is designed to be your quick reference guide for SQL programming. Whether you’re a beginner learning how to query databases or an experienced developer looking for a handy resource, this cheatsheet covers essential SQL topics.

1. Database Basics
   - CREATE DATABASE db_name;
   - USE db_name;

2. Tables
   - Create Table: CREATE TABLE table_name (col1 datatype, col2 datatype);
   - Drop Table: DROP TABLE table_name;
   - Alter Table: ALTER TABLE table_name ADD column_name datatype;

3. Insert Data
   - INSERT INTO table_name (col1, col2) VALUES (val1, val2);

4. Select Queries
   - Basic Select: SELECT * FROM table_name;
   - Select Specific Columns: SELECT col1, col2 FROM table_name;
   - Select with Condition: SELECT * FROM table_name WHERE condition;

5. Update Data
   - UPDATE table_name SET col1 = value1 WHERE condition;

6. Delete Data
   - DELETE FROM table_name WHERE condition;

7. Joins
   - Inner Join: SELECT * FROM table1 INNER JOIN table2 ON table1.col = table2.col;
   - Left Join: SELECT * FROM table1 LEFT JOIN table2 ON table1.col = table2.col;
   - Right Join: SELECT * FROM table1 RIGHT JOIN table2 ON table1.col = table2.col;

8. Aggregations
   - Count: SELECT COUNT(*) FROM table_name;
   - Sum: SELECT SUM(col) FROM table_name;
   - Group By: SELECT col, COUNT(*) FROM table_name GROUP BY col;

9. Sorting & Limiting
   - Order By: SELECT * FROM table_name ORDER BY col ASC|DESC;
   - Limit Results: SELECT * FROM table_name LIMIT n;

10. Indexes
   - Create Index: CREATE INDEX idx_name ON table_name (col);
   - Drop Index: DROP INDEX idx_name;

11. Subqueries
   - SELECT * FROM table_name WHERE col IN (SELECT col FROM other_table);

12. Views
   - Create View: CREATE VIEW view_name AS SELECT * FROM table_name;
   - Drop View: DROP VIEW view_name;


Hope it helps :)
3
 CGI Interview Questions 

1) Introduce Yourself

2) What is Full Stack Development?

3) Difference between GET and POST method

4) Explain OOPs Concepts with Examples

5) What is the difference between SQL and NoSQL?

6) Explain SDLC and Agile Model

7) Describe your Final Year Project

8) Write an SQL query to count employees in each department

9) SQL query to find duplicate records in a table

10) Difference between INNER JOIN and LEFT JOIN

11) SQL query to fetch top 3 highest salaries

12) Write a program to check if a number is a palindrome

13) Write a program to check if two strings are anagrams

14) Find the missing number in a sorted array

15) Implement Stack using Array

16) What is Time and Space Complexity?

17) What are your strengths and weaknesses?

18) Why do you want to join CGI?

19) Are you open to working night shifts or relocating?

20) How do you manage deadlines or pressure?
1
Accenture Interview Questions
1. Tell me about yourself. 
2. Tell me about your project and your roles in your project
3. Are u designing the framework, so tell me the folder structure of your framework.
4. Tell me what type of framework you are using.
5. Tell me the maven command.
6. Write a program to reverse a string.
7. Open the url Amazon, search for mobiles, scroll the page two times, and find the xpath of 7th listed Mobile phone....write a generic xpath. It should work when I use the same xpath in the new tab also.
8. Suppose there are multiple mobile numbers given in a website ..how u find which are the valid mobile number and which are invalid..give count also.
9. Write a selenium program to read the data from the Excel sheet.
10. Difference between method overloading and method overriding
11. What is the primary key, and how is it different from the foreign key.
12. Http status codes
13. Http methods call
14. What is inheritance where u apply in your framework. 
15. Explain the testng.xml file.