i
Community Brands
Filter interviews by
I applied via LinkedIn and was interviewed in Apr 2023. There were 2 interview rounds.
There are three types of iterators in Java: Iterator, ListIterator, and Enumeration.
Iterator is the most commonly used iterator, used to traverse collections like ArrayList, HashSet, etc.
ListIterator is used to traverse lists and allows bidirectional traversal and modification of elements.
Enumeration is the oldest type of iterator, used to traverse legacy collections like Vector and Hashtable.
HashMap is an implementation of Map interface that stores key-value pairs using a hash table.
HashMap uses hashing to store and retrieve elements.
It uses an array of linked lists to handle collisions.
The hash code of the key is used to determine the index of the array.
If multiple keys have the same hash code, they are stored in the same linked list.
When retrieving a value, the hash code is used to find the correct linke
SQL query to find the 2nd highest salary of an employee.
Use the SELECT statement to retrieve the salaries in descending order.
Use the LIMIT clause to limit the result to the second row.
Use the OFFSET clause to skip the first row.
Combine the above steps in a single SQL query.
The Java program counts the length of a string without using foreach and length function.
Iterate through each character of the string using a for loop
Increment a counter variable for each character encountered
Return the counter variable as the length of the string
I use lambda expressions, streams, and default methods in my current project.
Lambda expressions: I use them to write more concise and functional code.
Streams: I use them for processing collections of data in a declarative way.
Default methods: I use them to provide default implementations in interfaces.
To avoid hash collisions, use a good hash function, increase the size of the hash table, and handle collisions using techniques like chaining or open addressing.
Use a good hash function that distributes the keys evenly across the hash table.
Increase the size of the hash table to reduce the chances of collisions.
Handle collisions using techniques like chaining (using linked lists) or open addressing (probing).
Chaining e...
To check if a directed graph is cyclic or not
Use Depth First Search (DFS) algorithm to traverse the graph
Maintain a visited set to keep track of visited nodes
Maintain a recursion stack to keep track of nodes in the current DFS traversal
If a node is visited and is already in the recursion stack, then the graph is cyclic
If DFS traversal completes without finding a cycle, then the graph is acyclic
Return a random byte from a stream of bytes with equal probability.
Create a variable to store the count of bytes read
Create a variable to store the current random byte
For each byte read, generate a random number between 0 and the count of bytes read
If the random number is 0, store the current byte as the random byte
Return the random byte
Check if a binary tree is a binary search tree or not.
Traverse the tree in-order and check if the values are in ascending order.
For each node, check if its value is greater than the maximum value of its left subtree and less than the minimum value of its right subtree.
Use recursion to check if all nodes in the tree satisfy the above condition.
Algorithm to find Nth-to-Last element in a singly linked list of unknown length
Traverse the list and maintain two pointers, one at the beginning and one at Nth node from beginning
Move both pointers simultaneously until the second pointer reaches the end of the list
The first pointer will be pointing to the Nth-to-Last element
If N=0, return the last element
Parse the list only once
Print all possible permutations of an array of integers
Use recursion to swap elements and generate permutations
Start with the first element and swap it with each subsequent element
Repeat the process for the remaining elements
Stop when all elements have been swapped with the first element
Print each permutation as it is generated
Design a stack that prints the minimum element pushed in O(1)
Use two stacks, one for storing elements and another for storing minimums
When pushing an element, compare it with the top of minimum stack and push the smaller one
When popping an element, pop from both stacks
To get the minimum element, just return the top of minimum stack
To find the starting point of a loop in a linked list, use Floyd's cycle-finding algorithm.
Use two pointers, one moving at twice the speed of the other.
When they meet, move one pointer to the head of the list and keep the other at the meeting point.
Move both pointers one step at a time until they meet again, which is the starting point of the loop.
To find a number in a matrix where all rows and columns are sorted non-decreasingly. Complexity of the solution.
Use binary search to find the number in each row and column
Start from the top-right corner or bottom-left corner to optimize search
Time complexity: O(m log n) or O(n log m) depending on the starting corner
I appeared for an interview before Apr 2021.
Round duration - 60 minutes
Round difficulty - Easy
The second round is also written but you need to write programming based on their concept.
Given a positive integer N
, your task is to identify all prime numbers less than or equal to N
.
A prime number is a natural number greater than 1 that has no po...
Identify all prime numbers less than or equal to a given positive integer N.
Iterate from 2 to N and check if each number is prime
Use the Sieve of Eratosthenes algorithm for better efficiency
Optimize by only checking up to the square root of N for divisors
Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.
The string 'S' should be evaluated in a case...
Check if a given string is a palindrome after removing special characters, spaces, and converting to lowercase.
Remove special characters and spaces from the string
Convert the string to lowercase
Check if the modified string is a palindrome by comparing characters from start and end
Round duration - 60 minutes
Round difficulty - Easy
Technical round with questions mainly on Java and OOPS concepts.
Static methods belong to the class itself, while instance methods belong to individual objects of the class.
Static methods are called using the class name, while instance methods are called using object references.
Static methods cannot access instance variables directly, while instance methods can access both static and instance variables.
Static methods are shared among all instances of the class, while instance method...
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, member variables, and methods with implementation.
Interface can only have abstract methods and constants.
A class can implement multiple interfaces but can only extend one abstract class.
Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with m
ClassNotFoundException occurs when a class is not found during runtime, while NoClassDefFoundError occurs when a class was found during compilation but not during runtime.
ClassNotFoundException is a checked exception, while NoClassDefFoundError is an Error.
ClassNotFoundException occurs when a class is not found at runtime, usually due to a missing classpath or incorrect class name.
NoClassDefFoundError occurs when a cla...
Error is a serious issue that cannot be handled at runtime, while Exception is a recoverable issue that can be caught and handled.
Error is a subclass of Throwable and is usually caused by the environment or system, such as running out of memory or stack overflow.
Exception is also a subclass of Throwable but is caused by the application code, such as invalid input or file not found.
Errors are unchecked and are not meant...
SerialVersionUID is a unique identifier used by Java to ensure the compatibility of serialized objects.
SerialVersionUID is a static final long variable in a class that implements Serializable interface.
It is used to ensure that the serialized object can be deserialized correctly even if the class definition has changed.
If the SerialVersionUID of the serialized object does not match the one in the class, an InvalidClass...
Requirements for creating an immutable class in Java
Make the class final so it cannot be extended
Make all fields private and final
Do not provide setter methods, only getter methods
Ensure that mutable objects are not returned in getter methods
Override equals() and hashCode() methods for proper comparison
Consider making defensive copies of mutable fields in constructor or getter methods
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 Naukri.com and was interviewed before Jan 2024. There was 1 interview round.
Python interview question and coding
I appeared for an interview in Apr 2021.
Round duration - 120 Minutes
Round difficulty - Medium
I was MCQ + Coding round, Their were MCQ Based on DSA, Aptitude and 2 easy coding questions.
Ninja is organizing a coding competition where two teams compete at a time. To keep it fair and interesting, both teams must have an equal number of members. Ninja’s ta...
Check if Ninja can create two teams with equal members given an integer N and its divisors.
Iterate through all divisors of N and assign members to the first or second team based on whether the divisor is even or odd.
Keep track of the total members in each team and check if they are equal at the end.
Return true if the total members in both teams are equal, false otherwise.
Bob has just turned 18 and opened a bank account. Being inexperienced with banking, Bob needs your help to validate whether an IFSC code provided by his bank is valid.
...Validate IFSC code based on given rules and return True or False for each test case.
Check if the code is 11 characters long.
Verify the first four characters are uppercase alphabets.
Ensure the fifth character is '0'.
Validate that the last six characters are alphanumeric.
Round duration - 50 Minutes
Round difficulty - Easy
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Round duration - 50 minutes
Round difficulty - Easy
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Tip 1 : Be strong at your basics.
Tip 2 : Do at least 2 projects and ask to find answers like why are you choosing this tech stack? why did not you choose its alternatives Know your project in and out because they might ask you for a modification in your project?
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.
Tip 3 : Try to keep a single-page resume.
It was combination of mcqs and 2 coding questions
Object-oriented programming concepts that focus on objects and classes for better code organization and reusability.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation det...
Java is a programming language while Putjon is not a recognized term in software development.
Java is a widely used programming language for developing applications.
Putjon is not a recognized term in software development, it may be a typo or a specific term not commonly used.
There is no direct comparison between Java and Putjon as they are not related.
I appeared for an interview before Feb 2022.
posted on 30 Oct 2023
C# is a programming language developed by Microsoft for building a wide range of applications on the .NET framework.
C# is an object-oriented language with features like classes, inheritance, and polymorphism.
It is strongly typed, meaning variables must be declared with a specific data type.
C# supports modern programming concepts like async/await for asynchronous programming.
It is commonly used for developing desktop, w...
OOPs is a programming paradigm that uses objects to represent real-world entities and their interactions.
OOPs stands for Object-Oriented Programming.
It focuses on encapsulation, inheritance, and polymorphism.
Encapsulation means hiding the implementation details of an object from the outside world.
Inheritance allows creating new classes based on existing ones.
Polymorphism allows using a single interface to represent dif...
Some of the top questions asked at the Community Brands Java Software Developer interview -
based on 1 interview
Interview experience
Software Engineer
49
salaries
| ₹9 L/yr - ₹22 L/yr |
Senior Software Engineer
32
salaries
| ₹13.6 L/yr - ₹34.3 L/yr |
Software Developer
23
salaries
| ₹4.8 L/yr - ₹18 L/yr |
QA Engineer
21
salaries
| ₹7.3 L/yr - ₹13 L/yr |
Technical Lead
21
salaries
| ₹21 L/yr - ₹36 L/yr |
Prime Focus Technologies
MapmyIndia
Yodlee
Bravura Solutions