Tip 1 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 2 : Focus on ability to find solutions with workflows rather than the exact syntax
Tip 3 : Practical use cases if there for any question are more effective in explaining the solution and showing the knowledge
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
This was a technical interview round with questions around Python language, ML and DBMS.
What are dunder methods in Python?
Dunder or magic methods in Python are the methods having two prefix and suffix underscores in the method name. Dunder here means “Double Under (Underscores)”. These are commonly used for operator overloading.
Few examples for magic methods are: __init__, __add__, __len__, __repr__ etc.
How to create a Context Manager?
When creating context managers using classes, user need to ensure that the class has the methods: __enter__() and __exit__(). The __enter__() returns the resource that needs to be managed and the __exit__() does not return anything but performs the cleanup operations.
This is a sample python program for creating a context manager :
class ContextManager():
def __init__(self):
print('init method called')
def __enter__(self):
print('enter method called')
return self
def __exit__(self, exc_type, exc_value, exc_traceback):
print('exit method called')
with ContextManager() as manager:
print('with statement block')
What are generators and decorators?
Python generators were introduced in Python 2.3. It is an easier way to create iterators using a keyword yield from a function.
In the below example, a simple generator using the yield statements is created :
>>> def my_generator():
... print("Inside my generator")
... yield 'a'
... yield 'b'
... yield 'c'
Decorator is way to dynamically add some new behavior to some objects. We achieve the same in Python by using closures.
In the below example, a simple program has been created which will print some statement before and after the execution of a function :
>>> def my_decorator(func):
... def wrapper(*args, **kwargs):
... print("Before call")
... result = func(*args, **kwargs)
... print("After call")
... return result
... return wrapper
...
>>> @my_decorator
... def add(a, b):
... "Our add function"
... return a + b
Difference between List and Array
1. List can consist of elements belonging to different data types. Array only consists of elements belonging to the same data type
2. No need to explicitly import a module for declaration in list. Array need to explicitly import a module for declaration
3. List cannot directly handle arithmetic operations. Array can directly handle arithmetic operations
4. List can be nested to contain different type of elements. Array must contain either all nested elements of same size
5. List is preferred for shorter sequence of data items. Array is preferred for longer sequence of data items
Explain any ML model.
Logistic Regression
Logistic Regression utilizes the power of regression to do classification and has been doing so exceedingly well for several decades now, to remain amongst the most popular models. One of the main reasons for the model’s success is its power of explainability i.e. calling-out the contribution of individual predictors, quantitatively.
Unlike regression which uses Least Squares, the model uses Maximum Likelihood to fit a sigmoid-curve on the target variable distribution.
Given the model’s susceptibility to multi-collinearity, applying it step-wise turns out to be a better approach in finalizing the chosen predictors of the model.
The algorithm is a popular choice in many natural language processing tasks e.g. toxic speech detection, topic classification, etc.
What are the different types of joins in SQL?
Different types of Joins are:
INNER JOIN : The INNER JOIN keyword selects all rows from both the tables as long as the condition satisfies. This keyword will create the result-set by combining all rows from both the tables where the condition satisfies i.e value of the common field will be same.
Syntax:
SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
INNER JOIN table2
ON table1.matching_column = table2.matching_column;
LEFT JOIN : This join returns all the rows of the table on the left side of the join and matching rows for the table on the right side of join. The rows for which there is no matching row on right side, the result-set will contain null. LEFT JOIN is also known as LEFT OUTER JOIN.Syntax:
SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
LEFT JOIN table2
ON table1.matching_column = table2.matching_column;
RIGHT JOIN : RIGHT JOIN is similar to LEFT JOIN. This join returns all the rows of the table on the right side of the join and matching rows for the table on the left side of join. The rows for which there is no matching row on left side, the result-set will contain null. RIGHT JOIN is also known as RIGHT OUTER JOIN.Syntax:
SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
RIGHT JOIN table2
ON table1.matching
column = table2.matching_column;
FULL JOIN : FULL JOIN creates the result-set by combining result of both LEFT JOIN and RIGHT JOIN. The result-set will contain all the rows from both the tables. The rows for which there is no matching, the result-set will contain NULL values.Syntax:
SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
FULL JOIN table2
ON table1.matching_column = table2.matching_column;
Typical HR round with behavioral problems.
Q1. Introduction
Q2. Strengths and Weaknesses
Q3. Are you willing to relocate ?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?