Add office photos
Engaged Employer

Wissen Technology

3.9
based on 484 Reviews
Video summary
Filter interviews by

20+ Nykaa Interview Questions and Answers

Updated 14 Oct 2024
Popular Designations

Q1. Write a javascript function which returns maximum and minimum occurrence of letter from string

Ans.

A javascript function to find the maximum and minimum occurrence of a letter in a string.

  • Create an object to store the count of each letter in the string

  • Loop through the string and update the count in the object

  • Find the maximum and minimum count in the object and return the corresponding letters

Add your answer

Q2. Give a list of cards, sort on the basis of their rank and suit.

Ans.

Sort a list of cards based on their rank and suit.

  • Create a custom sorting function that first sorts by rank and then by suit

  • Use a comparison function to compare ranks and suits of each card

  • Example: ['2H', '3D', '10S', 'AH', '4C'] should be sorted as ['2H', '3D', '4C', '10S', 'AH']

Add your answer

Q3. write a program to merge 2 sorted list with n+m complexity

Ans.

Merge two sorted lists with n+m complexity

  • Create a new list to store the merged result

  • Iterate through both lists simultaneously and compare elements

  • Add the smaller element to the new list and move to the next element in that list

  • Continue until all elements from both lists are merged

Add your answer

Q4. 1. Write a program to split array on given split size.

Ans.

A program to split an array of strings into smaller arrays based on a given split size.

  • Iterate through the array and create a new subarray every split size elements

  • Use array slicing or a loop to extract the subarrays

  • Handle cases where the split size is larger than the array length

Add your answer
Discover Nykaa interview dos and don'ts from real experiences

Q5. 2. Write a program to flatten multi dimension Object[] array to Integer[]

Ans.

Program to flatten multi dimension Object[] array to Integer[]

  • Use recursion to iterate through the array and flatten each element

  • Check if each element is an array or an integer

  • If it's an array, recursively flatten it

  • If it's an integer, add it to the result array

Add your answer

Q6. Group by in java stream based on 2 fields

Ans.

Group by in Java stream based on 2 fields can be achieved using Collectors.groupingBy with a composite key

  • Use Collectors.groupingBy with a composite key to group by multiple fields

  • Create a class to represent the composite key if necessary

  • Example: Map>> groupedData = dataList.stream().collect(Collectors.groupingBy(obj -> obj.getField1() + obj.getField2()))

Add your answer
Are these interview questions helpful?

Q7. Create a project to maintain shopping list

Ans.

A project to maintain shopping list

  • Create a class or data structure to store items in the shopping list

  • Implement functions to add, remove, and update items in the list

  • Include functionality to mark items as purchased

  • Allow users to view the entire list or filter by category

  • Consider adding a feature to set reminders for shopping trips

Add your answer

Q8. design pattern to track count of hashmap inserts

Ans.

Use Observer design pattern to track count of hashmap inserts

  • Implement an Observer interface with update method to track changes in the hashmap

  • Create a concrete observer class to keep track of the count of inserts

  • Register the observer with the hashmap to receive notifications on inserts

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Static Constructor overloaded or not?

Ans.

Static constructor can be overloaded in C#.

  • Static constructor is used to initialize static fields of a class.

  • Overloading static constructor is useful when we want to initialize different static fields with different values.

  • Static constructor is called only once, before the first instance of the class is created.

  • Static constructor has no access modifier and no parameters.

Add your answer

Q10. Stream vs parallel stream of java

Ans.

Stream is sequential processing while parallel stream allows for concurrent processing in Java.

  • Stream is processed sequentially while parallel stream is processed concurrently.

  • Parallel stream can improve performance for large datasets by utilizing multiple threads.

  • Use parallel stream when order of processing is not important.

  • Example: List list = Arrays.asList("a", "b", "c"); list.stream().forEach(System.out::println);

  • Example: List list = Arrays.asList("a", "b", "c"); list.par...read more

Add your answer

Q11. Different between Thread and Task?

Ans.

Thread is a lightweight process that runs concurrently with other threads in a process. A task is a unit of work that can be executed asynchronously.

  • Threads are managed by the operating system, while tasks are managed by a task scheduler.

  • Threads are more low-level and require more manual management, while tasks are higher-level and can be managed more easily.

  • Threads are typically used for parallelism, while tasks are used for asynchronous programming.

  • Examples of threading lib...read more

Add your answer

Q12. what is dependency injection

Ans.

Dependency injection is a design pattern where components are given their dependencies rather than creating them internally.

  • Dependency injection helps in achieving loose coupling between classes.

  • It allows for easier testing by providing a way to mock dependencies.

  • There are three types of dependency injection - constructor injection, setter injection, and interface injection.

Add your answer

Q13. Difference between call, apply and bind

Ans.

Call, apply, and bind are methods in JavaScript used to set the context of a function and pass arguments.

  • Call - invokes a function with a specified 'this' value and arguments provided individually.

  • Apply - invokes a function with a specified 'this' value and arguments provided as an array.

  • Bind - creates a new function that, when called, has its 'this' keyword set to the provided value.

Add your answer

Q14. Java8 features in details

Ans.

Java8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions allow for more concise code by enabling functional programming.

  • Functional interfaces are interfaces with a single abstract method, which can be implemented using lambda expressions.

  • Streams provide a way to work with collections of objects in a functional style, allowing for parallel processing and lazy evaluation.

  • Default methods allow inte...read more

Add your answer

Q15. n+1 problem of hibernate

Ans.

The n+1 problem in Hibernate occurs when a query results in multiple individual queries being executed for each row fetched.

  • Occurs when a query fetches a collection and then for each element in the collection, another query is executed to fetch related data

  • Can be resolved by using fetch joins or batch fetching to reduce the number of queries

  • Improves performance by reducing the number of database round trips

Add your answer

Q16. design immutable class

Ans.

Immutable class is a class whose state cannot be modified after creation.

  • Make all fields private and final

  • Do not provide setter methods

  • Ensure deep copy of mutable objects in constructor and getter methods

Add your answer

Q17. Core java and dsa algorithm

Ans.

Core Java is a fundamental programming language used for developing software applications. DSA algorithms are essential for efficient problem-solving.

  • Core Java is used for developing software applications and is based on the Java programming language.

  • DSA algorithms are data structures and algorithms used for efficient problem-solving.

  • Examples of DSA algorithms include sorting algorithms like Bubble Sort and searching algorithms like Binary Search.

Add your answer

Q18. Dsa problems and system design

Ans.

DSA problems involve solving algorithmic challenges, while system design involves designing scalable and efficient software systems.

  • Practice solving DSA problems on platforms like LeetCode, HackerRank, or CodeSignal.

  • Study common data structures and algorithms like arrays, linked lists, trees, sorting algorithms, and searching algorithms.

  • For system design, focus on scalability, reliability, performance, and maintainability of software systems.

  • Learn about designing distributed ...read more

Add your answer

Q19. internal of hashmap

Ans.

Internal implementation of hashmap involves an array of linked lists to handle collisions.

  • HashMap internally uses an array of linked lists to store key-value pairs.

  • When a key is inserted, its hash code is used to determine the index in the array where it should be stored.

  • If two keys have the same hash code, they are stored in the same linked list to handle collisions.

  • HashMap uses the key's hash code and equals method to find and retrieve values efficiently.

Add your answer

Q20. max sum of subarray

Ans.

Find the maximum sum of a contiguous subarray within an array of integers.

  • Use Kadane's algorithm to find the maximum sum subarray efficiently.

  • Iterate through the array and keep track of the maximum sum ending at each index.

  • Reset the sum to 0 if it becomes negative, as a negative sum will never contribute to the maximum sum.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Nykaa

based on 15 interviews
4 Interview rounds
Technical Round - 1
Technical Round - 2
Technical Round - 3
Technical Round - 4
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.5
 • 97 Interview Questions
3.5
 • 93 Interview Questions
4.4
 • 16 Interview Questions
3.8
 • 15 Interview Questions
3.6
 • 14 Interview Questions
4.8
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter