i
Siemens
Filter interviews by
Clear (1)
I was interviewed before Mar 2021.
Round duration - 60 Minutes
Round difficulty - Medium
This round started with 1 coding question related to Prime Numbers in which I was first asked to explain my approach and then write the pseudo code for it. This was followed by some preety standard questions from OOPS and Java.
Find the Nth prime number given a number N.
A prime number is greater than 1 and is not the product of two smaller natural numbers. A prime number has exa...
To find the Nth prime number given a number N, implement a function that returns the Nth prime number.
Create a function that takes N as input and returns the Nth prime number.
Use a loop to iterate through numbers and check if they are prime.
Keep track of the count of prime numbers found until reaching N.
Optimize the algorithm by checking only up to the square root of the number for primality.
Example: For N = 7, the 7th
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, fields, and methods, while interface cannot.
A class can implement multiple interfaces but can only inherit from one abstract class.
Abstract classes are used to define a common base class for related classes, while interfaces define a contract for classes to implement.
Examp...
Garbage collector in Java is a built-in mechanism that automatically manages memory by reclaiming unused objects.
Garbage collector runs in the background to reclaim memory from objects that are no longer in use.
It helps prevent memory leaks and optimize memory usage.
Examples of garbage collectors in Java include Serial, Parallel, CMS, and G1.
Exception handling is a programming concept where errors or exceptional events are dealt with in a structured manner.
Exception handling allows for graceful handling of errors in a program.
It involves using try, catch, and finally blocks to manage exceptions.
Examples include catching divide by zero errors or file not found exceptions.
ConcurrentHashMap is a thread-safe implementation of the Map interface in Java.
ConcurrentHashMap allows multiple threads to read and write to the map concurrently without the need for external synchronization.
It achieves thread-safety by dividing the map into segments, each of which can be locked independently.
ConcurrentHashMap uses a combination of synchronized blocks and volatile variables to ensure thread-safety.
It ...
Round duration - 50 Minutes
Round difficulty - Medium
This round had 1 coding question related to LRU Cache where I had to code its implementation in a production-ready manner explaining my overall approach with proper complexity analysis. This was followed by some Mutithreading questions from Java and then at last the interviewer asked me some basic design patterns in Software Engineering and some more questions related to OOPS.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Implement a doubly linked list to keep track of the order of keys based on their recent usage.
Use a hashmap to store key-value pairs for quick access.
When capacity is reached, evict the least recently used item before inserting a new item.
Update the order of keys in the linked list whenever a key is acc
The start() method is used to start a new thread, while the run() method contains the code that will be executed by the thread.
start() method is used to start a new thread and calls the run() method.
run() method contains the code that will be executed by the thread.
Calling run() directly will not create a new thread, it will just execute the code in the current thread.
BlockingQueue is a thread-safe queue that supports operations that wait for the queue to become non-empty when retrieving an element.
BlockingQueue is part of the java.util.concurrent package in Java.
It is used to implement producer-consumer scenarios in multithreaded applications.
Operations like put() and take() are blocking, meaning they will wait until the queue is in a valid state to perform the operation.
Example: L
Thread starvation occurs when a thread is unable to access the CPU resources it needs to execute its tasks.
Occurs when a thread is constantly preempted by higher priority threads, preventing it from running
Can lead to performance degradation and delays in task completion
Can be mitigated by adjusting thread priorities or implementing thread pooling
A thread scheduler is responsible for managing the execution of multiple threads in a system. Time slicing is a technique used by the scheduler to allocate CPU time to each thread.
Thread scheduler is a component of the operating system that decides which thread to run next
Time slicing involves dividing the CPU time among multiple threads based on a predefined time interval
Example: In a round-robin scheduling algorithm,...
SOLID principles are a set of five design principles in object-oriented programming to make software more maintainable, flexible, and scalable.
Single Responsibility Principle (SRP) - A class should have only one reason to change.
Open/Closed Principle (OCP) - Software entities should be open for extension but closed for modification.
Liskov Substitution Principle (LSP) - Objects of a superclass should be replaceable with...
HashSet uses a hash table for storage, while TreeSet uses a red-black tree.
HashSet provides constant-time performance for basic operations like add, remove, contains.
TreeSet maintains elements in sorted order, allowing for efficient operations like range queries.
HashSet does not guarantee any specific order of elements, while TreeSet maintains a sorted order.
Example: HashSet<String> set = new HashSet<>(); T...
Round duration - 30 Minutes
Round difficulty - Easy
This is a cultural fitment testing round .HR was very frank and asked standard questions. Then we discussed about my role.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
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.
I applied via Recruitment Consultant and was interviewed before May 2017. There were 4 interview rounds.
Top trending discussions
I applied via Referral and was interviewed before Jan 2021. There was 1 interview round.
I applied via Campus Placement and was interviewed before Feb 2021. There were 3 interview rounds.
Aptitude round consists Logical reasoning, General Aptitude, Grammar related questions etc. All are moderate level questions.
OOPs is a programming paradigm that uses objects to represent real-world entities. Java is an OOPs language.
OOPs stands for Object-Oriented Programming System
Java is a class-based OOPs language
Encapsulation, Inheritance, Polymorphism, and Abstraction are the four pillars of OOPs
Objects have state and behavior
Java supports interfaces, which allow for multiple inheritance
Example: A car can be represented as an object wit...
Java solves machine dependency by using bytecode and virtual machine.
Java code is compiled into bytecode which is platform-independent
The bytecode is executed by the Java Virtual Machine (JVM) which is platform-specific
JVM translates bytecode into machine code for the specific platform
This allows Java code to run on any platform with a JVM installed
Example: A Java program compiled on Windows can run on Linux or Mac as
I applied via Campus Placement and was interviewed before May 2021. There were 2 interview rounds.
Numerical ability and logical reasoning followed by some coding mcqs
Printing 1 to 100 without for loop
Use recursion to print numbers from 1 to 99
Print 100 outside the recursion
Use a base case to stop recursion at 100
I applied via Campus Placement and was interviewed before Jun 2021. There were 2 interview rounds.
Simple aptitude test
I applied via Company Website and was interviewed before Jul 2021. There were 2 interview rounds.
Attended the codevita competition in final year of college.
I applied via Campus Placement and was interviewed before Aug 2021. There were 2 interview rounds.
It was a basic aptitude test.
I applied via Campus Placement and was interviewed before Jun 2021. There were 2 interview rounds.
I applied via Campus Placement and was interviewed before May 2021. There were 2 interview rounds.
- basic programming on C
based on 1 interview
Interview experience
based on 57 reviews
Rating in categories
Senior Software Engineer
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
1.5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager
604
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Executive
481
salaries
| ₹0 L/yr - ₹0 L/yr |
Schneider Electric
Siemens Energy
ABB
BHEL