Ksolves India Limited
Ciklum Interview Questions and Answers
Q1. find a number that not present in array in O(N) time complexity array contain only 0 to n numbers
Use bitwise XOR operation to find the missing number in O(N) time complexity.
Iterate through the array and XOR all the elements with their indices and the array length.
The missing number will be the result of XORing all the elements with their indices and the array length.
Q2. how to reverse a string without using extra space
Use two pointers to swap characters in place
Initialize two pointers, one at the beginning of the string and one at the end
Swap characters at the two pointers and move them towards each other until they meet or cross
Repeat the process until the entire string is reversed
Q3. how to connect mongodb with database
To connect MongoDB with a database, you need to use the MongoDB URI and a MongoDB client library.
Use the MongoDB URI to specify the connection details such as host, port, username, password, and database name
Install a MongoDB client library like Mongoose for Node.js or pymongo for Python
Use the client library to establish a connection to the MongoDB database and perform CRUD operations
Q4. write a program a string is Anagram or not
Program to check if a string is an Anagram or not
Create a function that takes in two strings as input
Sort the characters in both strings and compare if they are equal
Return true if they are anagrams, false otherwise
Q5. what is event listener
An event listener is a function that waits for a specific event to occur and then triggers a response.
Event listeners are commonly used in web development to handle user interactions like clicks, keypresses, etc.
They are attached to specific elements and listen for events to occur on those elements.
Once the event occurs, the listener executes a callback function to respond to the event.
Example: Adding a click event listener to a button element to perform an action when the bu...read more
Q6. what is polymorphism
Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: Inheritance in object-oriented programming languages like Java allows for polymorphism.
Interview Process at Ciklum
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month