Filter interviews by
I applied via Naukri.com and was interviewed before Mar 2023. There was 1 interview round.
var is mutable and can be reassigned, val is immutable and cannot be reassigned.
var can be reassigned with a new value, val cannot be reassigned once initialized
var is mutable, val is immutable
Example: var number = 5; number = 10; // valid, val number = 5; number = 10; // invalid
Kotlin is a modern programming language that is concise, expressive, and fully interoperable with Java.
Kotlin is statically typed and supports both object-oriented and functional programming.
It has features like null safety, extension functions, coroutines, and smart casts.
Kotlin is officially supported for Android development by Google.
Top trending discussions
I did my internship at XYZ Corporation.
Interned at XYZ Corporation
Worked in the marketing department
Assisted in creating social media campaigns
Conducted market research
Attended meetings with clients
I learned to take responsibility for my actions and to use my mistakes as opportunities for growth.
I learned to admit my mistakes and apologize when necessary
I learned to reflect on my mistakes and identify areas for improvement
I learned to seek feedback from others and use it to make positive changes
I learned to not be afraid of failure and to view it as a learning experience
For example, when I made a mistake at work ...
I have the skills, experience, and passion to contribute to the success of your company.
I have a proven track record of achieving targets and exceeding expectations.
I possess strong communication and interpersonal skills, which enable me to work effectively with colleagues and clients.
I am a quick learner and adaptable to new environments and technologies.
I am passionate about the industry and eager to contribute to th...
I have the necessary skills, experience, and passion to excel in this role.
I have relevant experience in the field
I possess the required skills and qualifications
I am a quick learner and adaptable to new situations
I am passionate about the industry and eager to contribute
I am a team player and work well with others
Polymorphism is the ability of an object to take on many forms. In C++, it is achieved through function overloading and virtual functions.
Polymorphism allows objects of different classes to be treated as objects of a common base class.
Function overloading enables multiple functions with the same name but different parameters.
Virtual functions allow derived classes to override base class functions.
Find sum of all numbers formed from root to leaf path in a binary tree
Traverse the binary tree using DFS
At each leaf node, add the number formed from root to leaf path to a sum variable
Return the sum variable
Time complexity: O(n)
Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25
Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.
Use recursion to generate all possible combinations of spaces
For each recursive call, either add a space or don't add a space between the current character and the next character
Base case is when there are no more characters left to add spaces between
Time complexity is O(2^n) where n is the length of the string
Preorder traversal without recursion
Use a stack to keep track of nodes
Push right child first and then left child onto stack
Pop top of stack and print value
Repeat until stack is empty
Find longest continuous patch on a 12 km road with updates in patches
Maintain a variable to keep track of current patch length
Update the variable whenever a new patch is added
Maintain a variable to keep track of longest patch so far
Compare current patch length with longest patch length and update if necessary
Use a sorted data structure like a binary search tree to store the patches for efficient search
Time complexity: ...
Find median of an unsorted array.
Sort the array and find the middle element
Use quickselect algorithm to find the median in O(n) time
If the array is small, use brute force to find the median
Find 'k' elements closest to a given number from a stream of characters.
Use a priority queue to keep track of closest elements.
Update the queue as new characters come in.
Return the 'k' closest elements from the queue.
Design a data structure with O(1) insert, remove, find-max, and delete-max operations.
Use a doubly linked list to maintain the elements in sorted order.
Use a hash table to store the pointers to the nodes in the linked list.
Maintain a pointer to the maximum element in the hash table.
Update the pointers in the hash table when inserting or removing elements.
Update the maximum pointer when deleting or inserting the maximum
Check if a given linked list is a palindrome.
Traverse the linked list and store the values in an array.
Compare the first and last elements of the array, then move towards the center.
If all elements match, the linked list is a palindrome.
Alternatively, use two pointers to find the middle of the linked list and reverse the second half.
Compare the first half with the reversed second half to check for a palindrome.
I am interested in this profile because of my passion for finance and my experience in the banking industry.
I have a degree in finance and have worked in the banking industry for 5 years.
I am passionate about helping clients achieve their financial goals.
I have experience in managing portfolios and analyzing financial data.
I am excited about the opportunity to work with a team of professionals in the banking industry.
based on 1 interview
Interview experience
Senior Software Engineer
7
salaries
| ₹13 L/yr - ₹17 L/yr |
Software Engineer
4
salaries
| ₹11.6 L/yr - ₹13 L/yr |
Data Engineer
4
salaries
| ₹16 L/yr - ₹22 L/yr |
Customer Success Manager
4
salaries
| ₹9 L/yr - ₹12 L/yr |
Product Manager
3
salaries
| ₹41 L/yr - ₹64.8 L/yr |
TCS
Accenture
Wipro
Cognizant