i
Birbal AI
Filter interviews by
I applied via Company Website and was interviewed in Sep 2024. There were 2 interview rounds.
It was an AI Interview only, on their platform itself. I was asked total 20 case study based questions on Java, Microservices, Kafka, Redis, Load balancing, Spring Security. I was given only 1 minute per question, means only 20 minutes. I cleared this round, don't know how, even when I vaguely answered most of the questions.
It was taken on HackerRank platform, needed me to have an account already existing. They told me to solve 2 medium level questions there, first one was on printing long factorial of a number, the solution involved using BigInteger. Second question was printing time in words, i.e. 5:45 -> quarter to 5, and similarly for other times in English. I was given total 30 minutes total. I cleared this round.
Developed a web application for tracking employee attendance and performance
Implemented user authentication and authorization using Spring Security
Utilized Hibernate for database interaction and data persistence
Designed and developed RESTful APIs for frontend integration
Used AngularJS for frontend development to create interactive user interfaces
ExecutorService is an interface in Java that provides a way to manage and control the execution of threads in a multithreaded environment.
It is part of the java.util.concurrent package.
It provides methods to submit tasks for execution, manage thread pools, and control the execution of tasks.
It allows for the execution of tasks asynchronously and provides features like scheduling, cancellation, and monitoring of tasks.
E...
JPA is a Java specification for mapping Java objects to relational databases.
JPA stands for Java Persistence API
It provides a way to map Java objects to database tables and vice versa
JPA simplifies the development of data access layer in Java applications
It supports object-relational mapping (ORM) and allows developers to work with entities, relationships, and queries in a more object-oriented way
PreparedStatement is used in Java to execute parameterized SQL queries to prevent SQL injection attacks.
PreparedStatement is a subinterface of Statement in Java.
It is used to execute parameterized SQL queries.
It helps prevent SQL injection attacks by automatically escaping special characters.
Example: PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM users WHERE username = ?");
Program to find missing numbers from Array
Iterate through the array and store each number in a HashSet
Then iterate from 1 to the length of the array and check if each number exists in the HashSet
If a number is not found in the HashSet, it is a missing number
Comparable is an interface used for natural ordering, while Comparator is used for custom ordering in Java.
Comparable interface is used to define the natural ordering of objects. It is implemented by the class whose objects are to be sorted.
Comparator interface is used to define custom ordering of objects. It is implemented by a separate class that compares objects based on specific criteria.
Example: Sorting a list of ...
List allows duplicate elements and maintains insertion order, while Set does not allow duplicates and does not maintain order.
List can contain duplicate elements, Set cannot
List maintains insertion order, Set does not guarantee order
List is implemented by classes like ArrayList, LinkedList, Set is implemented by classes like HashSet, TreeSet
Example: List
I applied via Naukri.com and was interviewed in Dec 2023. There were 2 interview rounds.
1. Find longest repeating character from back.
2. Find all non-duplicates in an array and return in sorted manner.
The class will have to provide its own implementation of the conflicting default method.
When implementing multiple interfaces with the same default method, a class must provide its own implementation of the conflicting method.
The class cannot inherit the default implementation from both interfaces.
The class can choose to implement one of the default methods and provide its own implementation for the other.
Alternatively...
Terminal operations in streams produce a result or a side effect, while intermediate operations transform or filter the data.
Terminal operations are the final operations in a stream pipeline, such as forEach, collect, or reduce.
Intermediate operations are operations that can be chained together, such as filter, map, or sorted.
Terminal operations trigger the processing of the stream and produce a result or a side effect...
try vs try-with-resources
The 'try' statement is used to define a block of code to be tested for exceptions.
The 'try-with-resources' statement is used to automatically close resources that implement the AutoCloseable interface.
Try-with-resources is more concise and less error-prone compared to try-catch-finally.
Try-with-resources can handle multiple resources in a single statement.
Iterator is a universal interface for iterating over a collection, while ListIterator is a specialized interface for iterating over lists.
Iterator can only move forward, while ListIterator can move in both directions.
ListIterator has additional methods like previous(), hasPrevious(), and add().
ListIterator is only available for List implementations, while Iterator can be used with any collection.
Projections in Spring Data JPA allow customizing the shape of the data returned from a query.
Projections are used to retrieve specific fields or a subset of fields from an entity.
They help in reducing the amount of data transferred over the network.
Projections can be defined using interfaces or classes.
They can be used with both JPQL and native SQL queries.
Projections can be used to fetch related entities as well.
The two types of compiler in Angular are JIT (Just-in-Time) compiler and AOT (Ahead-of-Time) compiler.
JIT compiler compiles the code at runtime in the browser.
AOT compiler compiles the code before the application is deployed to the browser.
JIT compilation is slower but allows for faster development and debugging.
AOT compilation is faster but requires additional build step before deployment.
Data binding in Angular allows automatic synchronization of data between the model and the view.
Interpolation: {{ }} - binds data from the component to the view
Property binding: [] - binds data from the component to an element property
Event binding: () - binds an event from the view to a method in the component
Two-way binding: [()] - combines property and event binding to achieve two-way data flow
Promises are used for asynchronous programming in JavaScript, while Observables are used for reactive programming.
Promises represent a single value that may be available now or in the future.
Observables represent a stream of values that can be emitted over time.
Promises are eager, meaning they start executing as soon as they are created.
Observables are lazy, meaning they only start executing when subscribed to.
Promises...
Constructor is a special method used to initialize an object, while ngOnInit is a lifecycle hook in Angular.
Constructor is used to create and initialize an object of a class.
ngOnInit is a lifecycle hook in Angular that is called after the component is initialized.
Constructor is defined using the constructor keyword, while ngOnInit is a method defined in the component class.
Constructor is called only once during the cre...
Inline templates are used for small, simple templates, while external templates are used for larger, complex templates.
Inline templates are defined within the component's TypeScript file using the template property.
External templates are defined in separate HTML files and linked to the component using the templateUrl property.
Inline templates are useful for small components or when the template is simple and doesn't re...
HttpClient module is used for http calls in Angular.
HttpClient module is part of the @angular/common/http package.
It provides a simplified API for making HTTP requests.
It supports various HTTP methods like GET, POST, PUT, DELETE, etc.
It also supports features like request/response headers, query parameters, error handling, etc.
Example: import { HttpClient } from '@angular/common/http';
Good coding questions related array and string
I applied via Referral and was interviewed in Dec 2023. There was 1 interview round.
Custom exception is a user-defined exception that extends the functionality of the built-in exceptions in Java.
Custom exceptions are created by extending the Exception class or one of its subclasses.
They allow developers to define their own exception types for specific scenarios.
Custom exceptions can include additional methods and fields to provide more information about the exception.
Example: public class CustomExcept...
Use a HashSet to find duplicate elements in an array of strings.
Create a HashSet to store unique elements.
Iterate through the array and check if the element is already in the HashSet.
If it is, then it is a duplicate element.
Example: String[] array = {"apple", "banana", "apple", "orange"};
I applied via Referral and was interviewed in May 2023. There were 3 interview rounds.
Spring Boot provides a simplified way to create stand-alone, production-grade Spring-based Applications.
Rapid application development
Embedded server for easy deployment
Auto-configuration for setting up Spring projects quickly
Microservices support
Actuator for monitoring and managing applications
Microservices architecture in Spring is a way of designing software applications as a collection of loosely coupled services.
Microservices architecture breaks down a large application into smaller, independent services that can be developed, deployed, and scaled independently.
Spring Boot and Spring Cloud are commonly used frameworks for building microservices in Java.
Each microservice typically has its own database and...
I applied via LinkedIn and was interviewed in Feb 2023. There were 2 interview rounds.
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values.
HashMap uses an array of buckets to store key-value pairs
The hash code of the key is used to determine the index of the bucket
If multiple keys have the same hash code, they are stored in a linked list within the bucket
HashMap allows null keys and values
HashMap is not thread-safe and requires synchronization for concurrent access
Program to print even and odd numbers using two threads in Java
Create two threads, one for even numbers and one for odd numbers
Use a loop to generate numbers and check if they are even or odd
Print the numbers using the respective threads
Use synchronization to ensure alternate printing of even and odd numbers
Interview experience
TCS
Accenture
Cognizant
Infosys