Senior Software Net Engineer
Senior Software Net Engineer Interview Questions and Answers
Q1. Return all the pairs from array who's sum is equal to given value
Use a hash set to store elements as you iterate through the array, check if the difference between the target value and current element exists in the hash set.
Iterate through the array and store elements in a hash set
For each element, check if the difference between the target value and current element exists in the hash set
If it does, add the pair to the result array
Q2. Can we create string 2 from string 1.
Yes, string 2 can be created from string 1 by rearranging the characters.
String 2 can be created by rearranging the characters of string 1.
Use sorting or permutation algorithms to rearrange the characters.
Example: String 1 = 'hello', String 2 = 'olleh'
Q3. design patterns - which one worked on
I have worked on various design patterns including Singleton, Factory, Observer, and Strategy.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Factory pattern creates objects without specifying the exact class of object that will be created.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Strategy pattern defines ...read more
Q4. Return orginal string from compressed string
Decompress a compressed string to return the original string
Iterate through the compressed string and rebuild the original string based on the characters and their frequencies
Use a stack to keep track of characters and their frequencies while decompressing the string
Q5. Compress the string aaabbbbaaa to 3a4b3a
Use a loop to iterate through the string and count consecutive characters.
Iterate through the string and keep track of the current character and its count.
Append the character and its count to a new string.
Return the compressed string.
Q6. worked on web services? explain
Yes, I have worked on web services. I have experience in designing, developing, and maintaining RESTful APIs.
Designed RESTful APIs for communication between different systems
Developed web services using technologies like Node.js, Express, and Spring Boot
Maintained and optimized existing web services for better performance
Integrated third-party APIs into existing systems for added functionality
Share interview questions and help millions of jobseekers 🌟
Q7. difference between globalzn and localzn
globalzn refers to variables or functions that can be accessed from anywhere in the program, while localzn refers to variables or functions that are only accessible within a specific scope.
Globalzn variables/functions can be accessed from anywhere in the program
Localzn variables/functions are only accessible within a specific scope
Globalzn variables/functions have a wider scope than localzn variables/functions
Q8. diffrnce bw abstraction and interfaces
Abstraction is hiding implementation details, while interfaces define a contract for classes to implement.
Abstraction focuses on hiding the internal implementation details of a class, allowing the user to only interact with the public methods and properties.
Interfaces define a contract that specifies a set of methods that a class must implement, without specifying how those methods are implemented.
Abstraction can be achieved through abstract classes in languages like Java, wh...read more
Senior Software Net Engineer Jobs
0Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month