Ksolves India Limited
20+ Secure Meters 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.
Q7. what is polymorphism and interface , what is difference between interface and abstract class
Polymorphism allows objects of different classes to be treated as objects of a common superclass. Interface is a contract that defines a set of methods that a class must implement.
Polymorphism allows for flexibility in programming by enabling a single interface to be used to represent multiple types of objects
Interfaces in Java are similar to abstract classes, but they cannot contain any implementation code
Abstract classes can have both abstract and concrete methods, while in...read more
Q8. What is Diff between static and final keyword in java
Static keyword is used to create class-level variables and methods, while final keyword is used to make a variable constant.
Static keyword is used to create variables and methods that belong to the class itself, rather than to any specific instance of the class.
Final keyword is used to make a variable constant and cannot be changed once it has been assigned a value.
Static variables are shared among all instances of a class, while final variables are unique to each instance.
Q9. Write a trigger on account object when account is created, 2 contacts will be inserted
Write a trigger on account object to insert 2 contacts when account is created.
Create a trigger on Account object
Use 'after insert' trigger event
Create 2 Contact records and assign Account Id to them
Insert the Contact records
Q10. what is diff between jvm, jre, jdk
JVM is the Java Virtual Machine that executes Java bytecode. JRE is the Java Runtime Environment that includes JVM and libraries. JDK is the Java Development Kit that includes JRE and development tools.
JVM is the virtual machine that runs Java bytecode and provides a runtime environment for Java programs.
JRE includes JVM along with libraries and other components necessary to run Java applications.
JDK is a development kit that includes JRE and development tools such as compile...read more
Q11. Cte vs subQuery Stored Procedure vs Functions in SQL Left outer join Pyspark optimisation DIA in azure data factory
CTE is used to create temporary result sets, stored procedures are reusable blocks of code, left outer join combines rows from two tables based on a related column
CTE (Common Table Expression) is used to create temporary result sets that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement.
Stored Procedures are reusable blocks of code that can be executed with a single call. They can accept input parameters and return output parameters.
Left Outer Join combin...read more
Q12. how hashmap internally worked
HashMap internally uses an array of linked lists to store key-value pairs, with keys hashed to determine the index.
HashMap uses hashing to determine the index of key-value pairs in the array.
Each index in the array can store multiple key-value pairs in a linked list.
When a key is inserted, its hash code is used to find the appropriate index in the array.
If multiple keys hash to the same index, they are stored in a linked list at that index.
HashMap dynamically resizes the arra...read more
Q13. what is Springboot rest api
Spring Boot is a framework for building Java-based web applications with minimal configuration.
Spring Boot simplifies the process of creating standalone, production-grade Spring-based applications.
It provides a range of features like embedded servers, auto-configuration, and production-ready metrics.
Spring Boot allows developers to quickly set up and run RESTful web services using annotations and minimal XML configuration.
Q14. Count number after decimal value What is decorator What is abstraction in python
To count number after decimal value in Python, use string manipulation or math module.
Use string manipulation to count number of digits after decimal point
Use math module to round off the number and then subtract the original number to get the digits after decimal point
Example: num = 3.14159, str_num = str(num), decimal_index = str_num.index('.') + 1, digits_after_decimal = len(str_num) - decimal_index
Q15. Smoke testing Sanity testing Regression Agile process Explain projects Write test cases
Smoke testing, sanity testing, regression, Agile process, projects, test cases
Smoke testing is a preliminary test to check if the software build is stable enough for further testing
Sanity testing is a subset of regression testing to quickly check if the critical functionalities are working after changes
Regression testing is re-testing of the software to ensure that new changes have not affected existing functionalities
Agile process is a software development methodology that e...read more
Q16. find cycle in linkedlist
Detect cycle in a linked list
Use two pointers approach - slow and fast pointers
If there is a cycle, the fast pointer will eventually catch up to the slow pointer
Check if the fast and slow pointers meet at some point to detect the cycle
Q17. How will you prepare strategy for product launch?
I will prepare a strategy for product launch by conducting market research, identifying target audience, setting goals, creating a timeline, and implementing SEO tactics.
Conduct market research to understand the target audience and competitors
Identify key features and benefits of the product to highlight in SEO campaigns
Set specific goals for the product launch, such as increasing website traffic or sales
Create a timeline with deadlines for each step of the launch process
Impl...read more
Q18. rest vs soap validation vs verification explain project
REST is lightweight, SOAP is protocol-based. Validation ensures requirements are met, verification ensures correctness. Project explanation needed.
REST is lightweight and uses standard HTTP methods like GET, POST, PUT, DELETE. SOAP is protocol-based and uses XML for communication.
Validation ensures that the product meets the requirements and specifications. Verification ensures that the product is correct and error-free.
Project explanation would involve detailing the specific...read more
Q19. what is OOPS concept
OOPS (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data and code.
OOPS focuses on creating objects that interact with each other to solve problems
Key principles include encapsulation, inheritance, polymorphism, and abstraction
Encapsulation involves bundling data and methods that operate on the data into a single unit
Inheritance allows one class to inherit properties and behavior from another class
Polymorphism enables...read more
Q20. What is Encapsulation
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.
Encapsulation helps in hiding the internal state of an object and restricting access to it.
It allows for better control over the data by preventing direct access from outside the class.
Getters and setters are commonly used to access and modify the encapsulated data.
Example: In a Car class, variables like speed and fuel are encapsulated, and methods like acce...read more
Q21. Define Four pillars
The four pillars of object-oriented programming in Java are abstraction, encapsulation, inheritance, and polymorphism.
Abstraction: Hides complex implementation details and only shows the necessary features to the outside world.
Encapsulation: Bundles data and methods that operate on the data into a single unit, preventing direct access from outside the class.
Inheritance: Allows a class to inherit properties and behavior from another class, promoting code reusability.
Polymorphi...read more
Q22. Write a Postgres Query
Query to retrieve all employees from a table named 'employees'
Use SELECT * FROM employees;
Make sure to replace 'employees' with the actual table name if different.
Top HR Questions asked in Secure Meters
Interview Process at Secure Meters
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month