Interview Concepts
Interview Concepts
1. What is SQL?
SQL (Structured Query Language) is a standard programming language
used to communicate with relational databases. It allows users to create,
read, update, and delete data, and provides commands to define database
schema and manage database security.
2. What is a database?
TRUNCATE.
DELETE.
SAVEPOINT.
A foreign key is a column (or set of columns) in one table that refers to the
primary key in another table. It establishes and enforces a relationship
between the two tables, ensuring data integrity.
● Arithmetic Operators: +, -, *, /, %
A view is a virtual table created by a SELECT query. It does not store data
itself, but presents data from one or more tables in a structured way.
Views simplify complex queries, improve readability, and enhance security
by restricting access to specific rows or columns.
tables.
● LEFT JOIN (LEFT OUTER JOIN): Returns all rows from the left
● RIGHT JOIN (RIGHT OUTER JOIN): Returns all rows from the
● FULL JOIN (FULL OUTER JOIN): Returns all rows when there is a
tables.
● OUTER JOIN: Returns all rows from one table (LEFT, RIGHT, or
FULL), and the matching rows from the other table. If there is no
been applied.
applies to groups.
clause.
The ORDER BY clause sorts the result set of a query in either ascending
(default) or descending order, based on one or more columns. This helps
present the data in a more meaningful or readable sequence.
● SQL Databases:
● NoSQL Databases:
○ Use flexible, schema-less structures (e.g.,
strict consistency.
condition.
specified.
The SELECT statement retrieves data from one or more tables. It is the
most commonly used command in SQL, allowing users to filter, sort, and
display data based on specific criteria.
1. Atomicity:
back.
2. Consistency:
transaction process.
3. Isolation:
complete.
4. Durability:
successfully completed.
Normalization in Database Management Systems (DBMS) is a process of
tables into smaller ones. It helps in improving data integrity and reducing
the chances of anomalies like update, insert, and delete anomalies. The
main goal of normalization is to ensure that each table contains data that
values.
● Rules:
key).
● Rules:
dependency).
● Rules:
● Rules:
functionally dependent.)
dependencies.
cases.
Benefits of Normalization
Example
Management System):
with rows and columns, where each row represents a record, and
interconnected records.
relationships.
efficient for certain types of queries but does not inherently enforce
OOPS
1. Banking Systems 💳
Where OOP is Used:
Gaming Development 🎮
Where OOP is Used:
1. What is Object Oriented Programming (OOPs)?
2. Why OOPs?
The main advantage of OOP is better manageable code that covers the
following:
spoken by users.
2. Object orientation eases maintenance by the use of
3. The OOPs paradigm is mainly useful for relatively big software.
3. What is a Class?
4. What is an Object?
C++
Java
Python
C#
// class definition
class Student {
String name;
class GfG {
// creating an object
student1.name = "Rahul";
Output
student1.name: Rahul
The main feature of the OOPs, also known as 4 pillars or basic principles
of OOPs are as follows:
1. Encapsulation
3. Polymorphism
4. Inheritance
OOPs Main Features
6. What is Encapsulation?
2. Bundling of data and methods together: Data and methods that
operate on that data are bundled together. For example, the data
Polymorphism can be classified into two types based on the time when
the call to the object or function is resolved. They are as follows:
● Runtime Polymorphism
A) Compile-Time Polymorphism
B) Runtime Polymorphism
The idea of inheritance is simple, a class is derived from another class and
uses data and implementation of that other class. The class which is
derived is called child or derived or subclass and the class from which the
child class is derived is called parent or base or superclass.
Access specifiers are special types of keywords that are used to specify or
control the accessibility of entities like classes, methods, and so on.
Private, Public, and Protected are examples of access specifiers or access
modifiers.
The key components of OOPs, encapsulation and data hiding, are largely
achieved because of these access specifiers.
● C++
● Java
● Python
● JavaScript
● C#
● Ruby
Polymorphism can be classified into two types based on the time when
the call to the object or function is resolved. They are as follows:
A) Compile-Time Polymorphism
Compile time polymorphism, also known as static polymorphism or early
binding is the type of polymorphism where the binding of the call to its
code is done at the compile time. Method overloading or operator
overloading are examples of compile-time polymorphism.
B) Runtime Polymorphism
Also known as dynamic polymorphism or late binding, runtime
polymorphism is the type of polymorphism where the actual
implementation of the function is determined during the runtime or
execution. Method overriding is an example of this method.
Yes, there are more challenges when you have more authority. Although
inheritance is a very strong OOPs feature, it also has significant
drawbacks.
● The base class and the child class, which are both engaged in
1. Single Inheritance: Child class derived directly from the base
class
classes.
3. Multilevel Inheritance: Child class derived from the class which
A unique class type known as an interface contains methods but not their
definitions. Inside an interface, only method declaration is permitted. You
cannot make objects using an interface. Instead, you must put that
interface into use and specify the procedures for doing so.
Both abstract classes and interfaces are special types of classes that just
include the declaration of the methods, not their implementation. An
abstract class is completely distinct from an interface, though. Following
are some major differences between an abstract class and an interface.
An abstract class can have final, The interface has only static
non-final, static and non-static variables. and final variables.
Classes do not use memory. They merely serve as a template from which
items are made. Now, objects actually initialize the class members and
methods when they are created, using memory in the process.
In C++ and Java, the constructor is named the same as the class name.
Example:
C++
Java
Python
class base:
def __init__(self):
print("This is a constructor")
In C++, the destructor name is also the same as the class name but with
the (~) tilde symbol as the prefix.
Example:
C++
Python
class base {
public:
In Java, the garbage collector automatically deletes the useless objects so
there is no concept of destructor in Java. We could have used finalize()
method as a workaround for the java destructor but it is also deprecated
since Java 9.
Example:
C++
Java
Python
class base {
void func()
}
30. What is pure virtual function?
Example:
C++
Java
abstract class base {
Answer:
Answer:
Answer:
Encapsulation is the concept of hiding the data and allowing controlled
access through methods. It ensures data security and prevents accidental
modification.
Example (Java)
class BankAccount {
if (amount > 0) {
balance += amount;
return balance;
Answer:
Abstraction hides implementation details and only shows essential
functionalities to the user.
Implementation:
void start() {
Answer:
Methods Can have both abstract and Can have only abstract
non-abstract methods methods (until Java 8)
Variables Can have variables (with Only public, static, final
any access modifier) variables
Answer:
void makeSound() {
@Override
void makeSound() {
System.out.println("Dog barks");
Answer:
Types of Inheritance:
Answer:
Example (Java)
class Car {
String model;
// Constructor
Car(String model) {
this.model = model;
}
A constructor has the same name as the class and has no return type.
Answer:
Answer:
Modifie Scope
r
Multiple No Yes
Inheritance
Answer:
Yes, a private constructor prevents object creation from outside the class.
It is mainly used in the Singleton Design Pattern.
DSA
1. What is an Array?
● Answer: A stack is a linear data structure following the Last In, First
Out (LIFO) principle. The main operations are:
○ push(): Adds an item to the stack.
○ pop(): Removes the item from the top of the stack.
○ peek(): Returns the item at the top without removing it.
○ isEmpty(): Checks if the stack is empty.
● Answer: A queue is a linear data structure that follows the First In,
First Out (FIFO) principle. Elements are added at the back (enqueue)
and removed from the front (dequeue). Unlike a stack (LIFO), the
queue removes elements in the order they were added.
● Answer: A binary tree is a tree data structure where each node has
at most two children, referred to as the left and right children. It can
be used to implement binary search trees, heaps, and more.
● Answer: A BST is a binary tree where each node has a value, and all
values in the left subtree are smaller, while values in the right
subtree are greater than the node’s value. BSTs enable efficient
search, insertion, and deletion operations.
7. Explain the difference between Breadth-First Search (BFS) and
Depth-First Search (DFS).
● Answer:
○ BFS: Explores nodes level by level, using a queue. It’s used for
finding the shortest path in unweighted graphs.
○ DFS: Explores as far down a branch as possible before
backtracking, using a stack or recursion. It’s useful for
exploring connected components.
● Answer:
○ Arrays have fixed size and allow random access but require
contiguous memory.
○ Linked Lists are dynamic in size, use pointers for connections,
and are better for insertion and deletion but don’t allow direct
indexing.
Searching Algorithms
1. Linear Search
Sorting Algorithms
○ Description: Divides the list into halves, sorts each half, and
then merges them back together.
○ Time Complexity:
■ Worst Case: O(nlogn)O(n \log n)
■ Average Case: O(nlogn)O(n \log n)
■ Best Case: O(nlogn)O(n \log n)
5. Quick Sort
ML
Basic Machine Learning Questions
● Overfitting: The model learns noise along with the data, leading to poor
generalization on new data.
● Underfitting: The model is too simple and fails to capture the underlying trend in the
data.
● Bagging: Multiple weak learners are trained independently and their outputs are
averaged (e.g., Random Forest).
● Boosting: Weak models are trained sequentially, with each model focusing on errors
of the previous one (e.g., AdaBoost, Gradient Boosting).
● High Bias (Underfitting): Model is too simple and makes a lot of errors.
● High Variance (Overfitting): Model is too complex and fits noise in the data.
● The goal is to find a balance between bias and variance.
● Accuracy
● Precision, Recall, F1-score
● ROC-AUC Curve
Advanced Topics
Answer:
Satellite image fusion is the process of integrating data from multiple satellite images to
produce a single image with enhanced spatial, spectral, or temporal resolution. The goal is
to improve image quality for better analysis and interpretation.
2. What are the types of image fusion techniques?
Answer:
Answer:
Answer:
● Supervised Learning: Training models to recognize and fuse images using labeled
datasets.
● Unsupervised Learning: Clustering-based techniques for feature extraction in
image fusion.
● Deep Learning: CNNs (Convolutional Neural Networks) and GANs (Generative
Adversarial Networks) improve fusion quality.
Answer:
Answer:
PCA transforms high-dimensional image data into a set of uncorrelated principal
components. In image fusion, the first principal component often contains the most important
information, which can be used for merging images effectively.
Answer:
CNNs learn spatial and spectral features from satellite images and can be used to
intelligently merge multiple images while minimizing artifacts. CNN-based fusion models can
outperform traditional methods like PCA and IHS (Intensity-Hue-Saturation) by learning
complex patterns.
Answer:
Answer:
11. What metrics are used to evaluate the quality of image fusion?
Answer:
12. How can you assess if fusion has improved image quality?
Answer:
● Compare the fused image with the original images using SSIM and PSNR.
● Conduct visual analysis to check for spectral distortion and spatial clarity.
● Use ML-based object detection models to see if classification accuracy improves.
Project
🔹 Smart City Planning: Governments use satellite images to plan roads, infrastructure,
and traffic systems. Your fused images can improve accuracy in land mapping and
resource allocation.
✅ Reduces costs – Instead of launching new satellites, existing data can be improved
predictions and monitoring systems.
✅
Your dataset comes from:
Publicly available satellite image datasets (NASA, ESA, Google Earth Engine, USGS
✅
Landsat).
✅
Open-source repositories like Sentinel, Landsat, MODIS images.
Synthetic datasets generated using Deep Learning models to train and test fusion
techniques.
A:
Q2: What metrics do you use to evaluate the quality of fused images?
A:
A:
Traditional methods like PCA and Wavelet Transform rely on hand-crafted features,
which may not always work well for complex images.
✅
Deep Learning methods:
✅
Learn features automatically using CNNs, Autoencoders, and GANs.
✅
Improve image clarity by removing noise and enhancing features.
Handle multiple image types, making fusion more adaptable.
🚀 Noise & Artifacts – Images may have noise, affecting fusion quality.
A:
🚀 Alignment Issues – Images from different satellites may not align perfectly.
🚀 Computational Cost – High-resolution image processing requires powerful hardware.
🚀 Color Distortion – Some fusion methods may change the image's original colors.
Q5: How would you handle images with different resolutions before
fusion?
A:
● Resizing & Cropping – Standardizing image dimensions.
● Data Augmentation – Rotations, flips, and brightness adjustments to improve model
generalization.
● Normalization – Scaling pixel values to [0,1] or [-1,1].
● Noise Reduction – Removing unwanted distortions.
✅
Your project can be developed on:
✅
Python (OpenCV, TensorFlow, PyTorch) – For image processing and ML models.
✅
Google Earth Engine (GEE) – For satellite image data collection.
✅
AWS/GCP/Azure – For cloud-based image processing (if required).
Jupyter Notebook / Colab – For experimentation and visualization.
Others :
Here are some basic interview questions and answers for Operating Systems (OS), Cloud
Computing, Software Development Life Cycle (SDLC), and Agile methodology.
○ Virtual memory allows the system to use part of the hard disk as RAM to
manage large applications efficiently.
5. What is a deadlock?
○ A deadlock occurs when multiple processes hold resources and wait
indefinitely for others to release their resources.
6. What is paging and segmentation?
○ Context switching is the process of saving the state of a CPU and switching to
another process.
Cloud Computing
Answer:
Cloud computing is the delivery of computing services (like servers, storage, databases,
networking, software, and analytics) over the internet (“the cloud”) to offer faster innovation,
flexible resources, and economies of scale.
Answer:
The main types of cloud computing are:
● Public Cloud – Services are offered to multiple customers over the internet (e.g.,
AWS, Azure, GCP).
● Private Cloud – Cloud services are used exclusively by a single organization.
● Hybrid Cloud – A combination of public and private cloud to allow data and
applications to be shared between them.
● Community Cloud – A shared cloud infrastructure for organizations with similar
concerns.
Answer:
The three primary cloud service models are:
Agile Methodology
○ Scrum is a framework within Agile that divides work into small iterations
(Sprints) with specific roles and ceremonies.
5. Who are the key roles in Scrum?
○ A short meeting where team members discuss progress, blockers, and the
day’s plan.
8. What is the difference between Scrum and Kanban?
○ Scrum follows fixed sprints, while Kanban focuses on continuous flow without
fixed iterations.
Here’s a crisp yet powerful explanation of each technology with real-time examples:
Concept: A powerful library for numerical computing, mainly used for handling arrays and
performing mathematical operations efficiently.
Real-time Example:
import numpy as np
● In finance, Pandas is used to analyze stock market trends by handling large CSV
files.
● In data analytics, it is used to clean and process data before feeding it into an ML
model.
import pandas as pd
df = pd.read_csv("sales_data.csv")
Concept: An open-source library for real-time computer vision applications like object
detection, facial recognition, etc.
Real-time Example:
import cv2
img = cv2.imread("image.jpg")
cv2.waitKey(0)
cv2.destroyAllWindows()
import tensorflow as tf
Concept: A dynamic deep learning framework that provides flexibility for research and
production.
Real-time Example:
import torch
Hr :
✅ Tip: For strengths, provide real examples. For weaknesses, mention how you’re
improving.
✅ Tip: Show career growth aligned with Encora’s technologies and goals.
Example Answer:
"In five years, I see myself as a skilled software engineer, specializing in AI and cloud-based
solutions. I aim to work on innovative projects that leverage machine learning and
automation to improve business processes. I also want to mentor junior developers and
contribute to open-source projects, continuing to learn and grow within Encora."
✅ Tip: Show that you remain calm, organized, and solution-focused under pressure.
Example Answer:
"I handle pressure by staying organized and prioritizing tasks effectively. When faced with
tight deadlines, I break tasks into smaller parts and focus on completing high-priority items
first. For example, during my final year, I balanced my internship, project work, and
placement preparation by setting clear goals and managing my time efficiently. This
approach helps me stay productive without feeling overwhelmed."
✅ Tip: Highlight your skills, attitude, and fit for the role.
Example Answer:
"You should hire me because I have a strong technical foundation in Python, machine
learning, and data analysis, which align well with Encora’s focus on AI and cloud
technologies. My ability to quickly adapt and learn new concepts, combined with my
problem-solving skills, allows me to contribute effectively to projects. Additionally, my
experience working in teams and handling real-world challenges ensures that I will be a
valuable asset to your organization."
Python vs java :
🚀
enterprise-focused language widely used in Android development, large-scale
applications, and banking systems.
Yes! Here are some basic Python programs that are commonly asked in technical
interviews:
if num > 1:
if num % i == 0:
break
else:
print("Prime number")
else:
if s == s[::-1]:
print("Palindrome")
else:
print("Not a palindrome")
lst = [1, 2, 3, 2, 4, 5, 1, 6]
unique_lst = list(set(lst))
print(unique_lst)
4️⃣ Find the Factorial of a Number
fact = 1
fact *= i
print("Factorial:", fact)
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
order = len(str(num))
if sum_digits == num:
print("Armstrong number")
else:
unique_lst.sort(reverse=True)
PYTHON :
Here are some Python interview questions along with their answers categorized by
difficulty level:
📗 Basic Level
1. What are the key features of Python?
○ PEP 8 is the style guide for Python code that promotes readability and
consistency, covering naming conventions, indentation (4 spaces), and line
length (max 79 chars).
4. What is the difference between is and ==?
○ == compares values.
○ is compares memory addresses (identity).
5. What are Python data types?
📘 Intermediate Level
1. What are list comprehensions?
2.
3. What is the difference between @staticmethod and @classmethod?
○ self refers to the current instance of the class, used to access variables and
methods.
5. Explain pass, continue, and break.
○ pass → Does nothing, acts as a placeholder
○ continue → Skips the current loop iteration
○ break → Exits the loop completely
6. What is the difference between shallow copy and deep copy?
📙 Advanced Level
1. Explain Generators and Iterators.
def count_up_to(n):
count = 1
yield count
count += 1
○ GIL ensures that only one thread executes at a time in CPython, limiting true
multi-threading but simplifying memory management.
3. What is the difference between map(), filter(), and reduce()?
numbers = [1, 2, 3, 4]
print(reduce(lambda x, y: x + y, numbers)) # 10
add = lambda x, y: x + y