Add office photos
Engaged Employer

ZeMoSo Technologies

3.7
based on 166 Reviews
Filter interviews by

80+ Dr.B.C.Roy Engineering College Interview Questions and Answers

Updated 13 Jan 2025
Popular Designations
Q1. Sum Of Max And Min

You are given an array “ARR” of size N. Your task is to find out the sum of maximum and minimum elements in the array.

Follow Up:
Can you do the above task in a minimum number of comparisons? ...read more
View 8 more answers
Q2. Ninja And Alternating Largest

Ninja is given a few numbers, and he is being asked to rearrange the numbers so that every second element is greater than its left and right element.

Suppose the given array is [1, ...read more

Ans.

The task is to rearrange the given array such that every second element is greater than its left and right element.

  • Read the number of test cases

  • For each test case, read the number of elements in the array and the array elements

  • Iterate through the array and swap elements at odd indices with their adjacent elements if necessary

  • Check if the rearranged array satisfies the conditions and print 1 if it does, else print 0

View 2 more answers
Q3. Longest Common Prefix After Rotation

You are given two strings 'A' and 'B' where string 'A' is fixed. But you can perform left shift operations on string B any number of times.

Your task is to find out the minim...read more

Ans.

The question asks to find the minimum number of left shift operations required to obtain the longest common prefix of two given strings.

  • Perform left shift operations on string B to find the longest common prefix with string A

  • Count the number of left shift operations required to obtain the longest common prefix

  • Return the minimum number of left shift operations for each test case

View 2 more answers
Q4. Sub Sort

You are given an integer array ‘ARR’. You have to find the length of the shortest contiguous subarray such that, if you sort this subarray in ascending order, then the whole array will be sorted in asce...read more

Ans.

The question asks to find the length of the shortest contiguous subarray that needs to be sorted in order to sort the whole array.

  • Iterate through the array and find the first element that is out of order from the left side.

  • Iterate through the array and find the first element that is out of order from the right side.

  • Find the minimum and maximum element within the subarray from the above steps.

  • Expand the subarray from both sides until all elements within the subarray are in the...read more

View 4 more answers
Discover Dr.B.C.Roy Engineering College interview dos and don'ts from real experiences
Q5. Implementation: HashMap

Design a data structure that stores a mapping of a key to a given value and supports the following operations in constant time.

1. INSERT(key, value): Inserts an integer value to the data...read more
Add your answer
Q6. DBMS Qustions

1. What is Normalization and why do we use it?
2. Write an SQL query to find the position of the alphabet (‘o’) in the first name column ‘Zemoso’ from Company table.
3. Write an SQL query to fetch du...read more

Ans.

Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity.

  • Normalization helps in reducing data redundancy by breaking down a large table into smaller, more manageable tables.

  • It ensures data consistency and eliminates anomalies like update, insert, and delete anomalies.

  • Normalization improves database performance and simplifies data maintenance.

  • There are different normal forms (1NF, 2NF, 3NF, etc.) that define specific rule...read more

Add your answer
Are these interview questions helpful?
Q7. Aptitude Question

You have ten stacks of ten coins each and each of them weighs 10 gm. However, one of the stacks is faulty and each of the coins in it weighs only 9 gms. What is the least number of times you ha...read more

Ans.

The least number of times you have to weigh to find the faulty coin is 2.

  • First, divide the ten stacks into two groups of five stacks each.

  • Weigh one group against the other group.

  • If the weights are equal, the faulty stack is in the remaining five stacks.

  • If the weights are unequal, the faulty stack is in the lighter group.

  • Now, divide the lighter group into two groups of two stacks each.

  • Weigh one group against the other group.

  • If the weights are equal, the faulty stack is in the ...read more

Add your answer

Q8. New technologies learnt in last 6 months.

Ans.

React Native, GraphQL, Docker

  • Learned React Native for cross-platform mobile app development

  • Explored GraphQL for efficient data fetching and manipulation

  • Gained knowledge in Docker for containerization and deployment

Add your answer
Share interview questions and help millions of jobseekers 🌟
Q9. OS Questions

1. What is the main purpose of an operating system?
2. What is the difference between process and program?
3. What is the use of paging in operating system?
4. What is the concept of demand paging?

Ans.

Operating system is responsible for managing computer hardware and software resources.

  • The main purpose of an operating system is to provide an interface between the user and the computer hardware.

  • A process is an instance of a program in execution, while a program is a set of instructions stored on disk.

  • Paging is a memory management technique used by operating systems to efficiently manage memory.

  • Demand paging is a technique where pages are loaded into memory only when they ar...read more

Add your answer

Q10. Write code based on situation with proper implementation using Design patterns etc.

Ans.

Implement a code scenario using design patterns

  • Identify the problem statement and requirements

  • Choose appropriate design patterns like Singleton, Factory, Observer, etc.

  • Implement the code following the selected design patterns

  • Test the code for functionality and efficiency

Add your answer

Q11. Default and static methods in interface?

Ans.

Default and static methods in interface allow for method implementation and utility methods in Java interfaces.

  • Default methods provide a default implementation for a method in an interface.

  • Static methods in interfaces can be called directly on the interface itself.

  • Default and static methods were introduced in Java 8.

  • Default methods can be overridden by implementing classes.

  • Static methods cannot be overridden and are not inherited by implementing classes.

Add your answer

Q12. Internal working of Node.js and how node processes asynchronous requests

Ans.

Node.js is a runtime environment that executes JavaScript code outside of a web browser, using an event-driven, non-blocking I/O model.

  • Node.js uses the V8 JavaScript engine to execute code.

  • It uses an event-driven architecture to handle asynchronous operations.

  • Node.js uses a single-threaded event loop to process multiple requests concurrently.

  • Callbacks are used to handle asynchronous operations in Node.js.

  • Node.js provides modules like 'fs' for file system operations and 'http'...read more

Add your answer

Q13. How many type of authentication can be implemented

Ans.

There are multiple types of authentication that can be implemented, including password-based, token-based, biometric, and multi-factor authentication.

  • Password-based authentication: Users authenticate themselves using a password.

  • Token-based authentication: Users authenticate themselves using a token, such as a one-time password or a security key.

  • Biometric authentication: Users authenticate themselves using their unique biological characteristics, such as fingerprints or facial...read more

Add your answer

Q14. Design a database scheme of one of the known website.

Ans.

Design a database scheme for Amazon website

  • Create tables for users, products, orders, reviews, and payments

  • Use primary and foreign keys to establish relationships between tables

  • Include attributes such as user_id, product_id, order_id, review_id, and payment_id

  • Implement indexes for faster data retrieval

  • Consider denormalization for performance optimization

Add your answer

Q15. Find the number of consecutive alphabets in a string.

Ans.

The question asks to find the number of consecutive alphabets in a string.

  • Iterate through the string and check if each character is consecutive to the previous one.

  • Keep track of the count of consecutive alphabets encountered.

  • Return the count at the end.

Add your answer

Q16. Singleton pattern for thread safety .

Ans.

Singleton pattern ensures only one instance of a class is created and provides a global point of access to it.

  • Use lazy initialization to create the instance only when needed.

  • Use synchronized keyword to make the getInstance() method thread-safe.

  • Consider using double-checked locking for better performance.

  • Use enum to implement singleton pattern as it is inherently thread-safe.

Add your answer

Q17. API to update the salary of the employee

Ans.

API endpoint to update employee salary

  • Create a PUT request endpoint with employee ID and new salary as parameters

  • Verify user authentication and authorization before updating the salary

  • Update the salary in the database and return success message

Add your answer

Q18. Given an integer array , and a target k , we need to find the pair of elements from array whose sum will be equal to target k.

Ans.

Find pair of elements in array whose sum is equal to target k.

  • Use a hashmap to store the difference between target k and each element in the array.

  • Iterate through the array and check if the current element's complement exists in the hashmap.

  • Return the indices of the pair that sums up to target k.

Add your answer

Q19. Develop springboot api for a given table

Ans.

Develop a Spring Boot API for a given table

  • Create a Spring Boot project with necessary dependencies

  • Define entity class representing the table

  • Create a repository interface extending JpaRepository

  • Implement service layer with business logic

  • Create REST controller with CRUD operations

Add your answer

Q20. Convert a String into sub-strings based on the number of given rows in a zig-zag pattern and display as a single string P A H N I/P: "paypalishiring" ----> A P L S I. I G Y . I R O/P: "PAHNAPLSIIGYIR"

Ans.

Convert a given string into sub-strings based on the number of rows in a zig-zag pattern and display as a single string.

  • Create an array of strings with the number of rows specified

  • Iterate through the input string and distribute characters in a zig-zag pattern

  • Concatenate the sub-strings row by row to form the final output string

Add your answer

Q21. Designing an API for a Product table, basically CRUD operations

Ans.

Designing a RESTful API for CRUD operations on a Product table

  • Use HTTP methods like GET, POST, PUT, DELETE for CRUD operations

  • Create endpoints like /products for listing all products, /products/{id} for specific product, etc.

  • Use JSON format for request and response bodies

  • Implement authentication and authorization mechanisms for secure access

Add your answer

Q22. Linked list implementation

Ans.

Linked list is a data structure where each element points to the next element in the sequence.

  • Nodes contain data and a reference to the next node

  • Insertion and deletion can be done efficiently in a linked list

  • Traversal starts from the head node and follows the next pointers

Add your answer

Q23. One programming question to print only unique numbers from given array.

Ans.

Print unique numbers from given array of strings.

  • Convert array of strings to array of integers.

  • Use a set to store unique numbers.

  • Iterate through array and add numbers to set if not already present.

  • Print out the unique numbers from the set.

Add your answer

Q24. Given a Map of fruits with there price as a key value pair respectively, find the fruit whose price is maximum using Java 8 Stream API.

Ans.

Using Java 8 Stream API to find the fruit with maximum price in a Map of fruits.

  • Use entrySet() method to get a stream of key-value pairs from the Map.

  • Use max() method with Comparator.comparing() to find the entry with maximum price.

  • Extract the key (fruit) from the entry with maximum price.

Add your answer

Q25. Height of the binary tree

Ans.

Height of a binary tree is the maximum number of edges on the longest path from the root node to a leaf node.

  • The height of an empty tree is -1.

  • The height of a tree with only one node is 0.

  • The height of a binary tree can be calculated recursively by finding the height of the left and right subtrees and adding 1 to the maximum of the two heights.

Add your answer

Q26. Given an input string "aaabbCCaaDD" , O/p : a3b2C2a2D2 , we need to find the frequency of subsequent characters.

Ans.

The task is to find the frequency of subsequent characters in a given input string.

  • Iterate through the input string while keeping track of the current character and its frequency.

  • If the current character is the same as the previous character, increment the frequency count.

  • If the current character is different, append the previous character and its frequency to the output string.

  • Repeat until the end of the input string is reached.

Add your answer

Q27. Actuator in spring boot and what are the actuator endpoints

Ans.

Actuator in Spring Boot provides production-ready features like monitoring and metrics.

  • Actuator is a set of tools provided by Spring Boot to monitor and manage your application.

  • Actuator endpoints are URLs that provide information about your application, such as health, metrics, info, etc.

  • Examples of actuator endpoints include /actuator/health, /actuator/metrics, /actuator/info, etc.

Add your answer

Q28. Caching in Hibernate

Ans.

Caching in Hibernate improves performance by storing frequently accessed data in memory.

  • Hibernate supports first-level cache at session level

  • Second-level cache can be configured at session factory level

  • Caching strategies include read-only, read-write, and transactional

  • Cache providers like Ehcache, Infinispan, and Hazelcast can be used

Add your answer

Q29. What are the features of Date and Time API in Java 8

Ans.

Java 8 Date and Time API provides improved date and time handling capabilities.

  • Introduction of new classes like LocalDate, LocalTime, LocalDateTime, ZonedDateTime, OffsetTime, OffsetDateTime, and Instant for better date and time manipulation

  • Support for time zones and offsets

  • Ability to perform date and time calculations easily

  • Enhanced formatting and parsing capabilities

  • Integration with existing date and time classes like java.util.Date and java.util.Calendar

Add your answer

Q30. sort 0 and 1

Ans.

Sort an array of 0s and 1s in linear time complexity.

  • Use two pointers approach - one from the start and one from the end of the array.

  • Swap 0s to the left side and 1s to the right side until the pointers meet.

  • Time complexity: O(n), Space complexity: O(1)

Add your answer

Q31. Implement LRU cache

Ans.

LRU cache is a data structure that stores the most recently used items, discarding the least recently used items when full.

  • Use a combination of a doubly linked list and a hashmap to efficiently implement LRU cache.

  • Keep track of the most recently used item at the head of the linked list and the least recently used item at the tail.

  • When a new item is accessed, move it to the head of the linked list and update the hashmap accordingly.

  • If the cache is full, remove the item at the ...read more

Add your answer

Q32. Write a program to check whether the parenthesis are properly balanced or not, means for every opening brace these should be a closing brace present.

Ans.

Program to check if parenthesis are properly balanced

  • Use a stack data structure to keep track of opening parenthesis

  • Iterate through the input string and push opening parenthesis onto the stack

  • When a closing parenthesis is encountered, pop from the stack and check if it matches the corresponding opening parenthesis

  • If stack is empty at the end and all parenthesis are matched, then the input has properly balanced parenthesis

Add your answer

Q33. Count the continuous unique character from given string "aaaaBbbbCDEaAb", O/P: a4 B4 C1 D1 E1 a2 b2

Ans.

Count the continuous unique characters in a given string.

  • Iterate through the string and keep track of the current character and its count

  • If the current character is different from the previous one, print the count and reset it

  • Handle both uppercase and lowercase characters separately

Add your answer

Q34. Java memory management for heap and stack, what is the use of string pool, java 8 features, multi threading sample program, explain one design pattern with example

Ans.

Java memory management, string pool, Java 8 features, multi threading, design patterns

  • Java memory management involves managing memory allocation for heap and stack. Heap is used for storing objects and is managed by garbage collector. Stack is used for method calls and local variables.

  • String pool is a special area in heap memory where String literals are stored to optimize memory usage. Strings with same values are stored only once in the pool.

  • Java 8 features include lambda e...read more

Add your answer

Q35. What is the difference between smoke & sanity testing?

Ans.

Smoke testing is a quick and shallow test to check basic functionality, while sanity testing is a more thorough test to ensure system stability.

  • Smoke testing is done to check if the critical functionalities of the system are working or not.

  • Sanity testing is done to check if the system is stable enough to proceed with further testing.

  • Smoke testing is usually done after a build is deployed, while sanity testing is done after major changes are made to the system.

  • Smoke testing is...read more

Add your answer

Q36. System design of Paytm and Microservices Architecture.

Ans.

Paytm uses microservices architecture for scalability and flexibility in system design.

  • Paytm's system design is based on microservices architecture to break down the application into smaller, independent services.

  • Each service in Paytm's architecture handles a specific function, such as payments, wallet, or shopping.

  • Microservices communicate with each other through APIs, allowing for easier scalability and maintenance.

  • This architecture enables Paytm to quickly add new features...read more

Add your answer

Q37. high level system design for a movie booking app

Ans.

A movie booking app system design involves user authentication, movie selection, seat reservation, payment processing, and booking confirmation.

  • User authentication: Implement login/signup functionality for users.

  • Movie selection: Display list of movies with details like showtimes, ratings, and genres.

  • Seat reservation: Allow users to select seats for chosen movie showtime.

  • Payment processing: Integrate payment gateway for secure transactions.

  • Booking confirmation: Send confirmati...read more

Add your answer

Q38. Given a list of integer find the first non repeating integer using stream API of Java 8.

Ans.

Find the first non-repeating integer in a list using Java 8 stream API.

  • Use Java 8 stream API to group integers by count

  • Filter out integers with count greater than 1

  • Return the first non-repeating integer

Add your answer

Q39. Getting number of unique elements of array with in-place modification

Ans.

Use hash set to track unique elements while iterating through array and modify array in-place

  • Iterate through array and add elements to hash set to track unique elements

  • Modify array in-place by removing duplicates using hash set

  • Return the size of the hash set as the number of unique elements

Add your answer

Q40. Database optimization techniques

Ans.

Database optimization techniques involve indexing, query optimization, normalization, and denormalization.

  • Use indexing to improve query performance by creating indexes on frequently searched columns.

  • Optimize queries by avoiding unnecessary joins, using proper WHERE clauses, and limiting the number of returned rows.

  • Normalize database tables to reduce redundancy and improve data integrity.

  • Consider denormalization for read-heavy applications to improve query performance at the c...read more

Add your answer

Q41. How the communication is happening between the microservices ?

Ans.

Communication between microservices is typically done through APIs, messaging queues, or service meshes.

  • Microservices communicate with each other through APIs, which allow them to send and receive data over the network.

  • Messaging queues like RabbitMQ or Kafka can be used for asynchronous communication between microservices.

  • Service meshes like Istio or Linkerd can handle communication between microservices by managing traffic, security, and monitoring.

  • RESTful APIs are commonly ...read more

Add your answer

Q42. sql query to find 2nd largest salary

Ans.

Use SQL query with ORDER BY and LIMIT to find 2nd largest salary.

  • Use ORDER BY clause to sort salaries in descending order

  • Use LIMIT 1,1 to get the second row after skipping the first row

Add your answer

Q43. Explain All sorting techniques and implement bubble sort in online compiler.

Ans.

Explanation of sorting techniques and implementation of bubble sort

  • Sorting techniques include bubble sort, selection sort, insertion sort, merge sort, quick sort, etc.

  • Bubble sort compares adjacent elements and swaps them if they are in the wrong order, repeating until the array is sorted.

  • Example: [5, 3, 8, 2, 1] -> [3, 5, 8, 2, 1] -> [3, 5, 2, 8, 1] -> [3, 5, 2, 1, 8] -> [3, 2, 5, 1, 8] -> [3, 2, 1, 5, 8] -> [2, 3, 1, 5, 8] -> [2, 1, 3, 5, 8] -> [1, 2, 3, 5, 8]

Add your answer

Q44. How SQL index works internally, SQL execution order

Ans.

SQL indexes are data structures that improve the speed of data retrieval operations by providing quick access to rows in a table.

  • SQL indexes are created on columns in a table to speed up SELECT queries.

  • When a query is executed, the SQL engine first checks if there is an index on the columns involved in the query.

  • If an index is present, the SQL engine uses it to quickly locate the rows that satisfy the query conditions.

  • The SQL execution order typically involves parsing, optimi...read more

Add your answer

Q45. Design pattern of microservices architecture

Ans.

Microservices architecture is a design pattern where an application is composed of small, independent services that communicate over well-defined APIs.

  • Each microservice is responsible for a specific business function or capability

  • Services are loosely coupled and can be developed, deployed, and scaled independently

  • Communication between services is typically done through lightweight protocols like HTTP or messaging queues

  • Microservices architecture promotes flexibility, scalabil...read more

Add your answer

Q46. Branching strategies in Agile methodologies

Ans.

Branching strategies in Agile methodologies involve creating separate branches for different features or tasks to enable parallel development.

  • Feature branching: Each feature or user story is developed in a separate branch, allowing for isolation and independent testing.

  • Release branching: A branch is created for each release, enabling bug fixes and maintenance to be done separately from ongoing development.

  • Task branching: Developers create branches for individual tasks or sub-...read more

Add your answer

Q47. What is the use of pretty in JavaScript

Ans.

The pretty function in JavaScript is used to format and display data in a more visually appealing way.

  • Pretty function is used to format JSON data for better readability.

  • It can be used to display data in a structured and organized manner.

  • Pretty function is commonly used in debugging to make output easier to read.

Add your answer

Q48. create a spring boot project and implement crud operation for user table.

Ans.

Implement CRUD operations for user table in a Spring Boot project.

  • Create a Spring Boot project using Spring Initializr

  • Define a User entity with necessary fields and annotations

  • Create a UserRepository interface extending JpaRepository

  • Implement methods in a UserService class for CRUD operations

  • Use RESTful endpoints to expose the CRUD operations

Add your answer

Q49. Cross questioning in solution and wireframes you made

Ans.

I always cross-question my solutions and wireframes to ensure they meet the requirements and are user-friendly.

  • I review the wireframes and solutions multiple times to ensure they align with the product goals and user needs.

  • I seek feedback from stakeholders and users to identify any potential issues or areas for improvement.

  • I make necessary adjustments to the wireframes and solutions based on the feedback received.

  • I conduct usability testing to ensure the final product is intu...read more

Add your answer

Q50. how to sort an array and complexity

Ans.

Sorting an array of strings using a sorting algorithm like quicksort or mergesort.

  • Use a sorting algorithm like quicksort or mergesort to sort the array of strings.

  • Ensure the sorting algorithm is efficient and has a time complexity of O(n log n).

  • Consider the space complexity of the sorting algorithm as well.

Add your answer

Q51. How collections works internally?

Ans.

Collections in programming languages are data structures that store and organize multiple elements.

  • Collections can be implemented using various data structures such as arrays, linked lists, hash tables, and trees.

  • They provide methods for adding, removing, and accessing elements efficiently.

  • Examples of collections in Java include ArrayList, LinkedList, HashMap, and TreeSet.

Add your answer

Q52. Explain Node.js event driven architecture.

Ans.

Node.js event driven architecture is a non-blocking, asynchronous model where events trigger callbacks.

  • Node.js uses an event loop to handle asynchronous operations.

  • Callbacks are registered for specific events and executed when the event occurs.

  • Event emitters in Node.js trigger events that are handled by listeners.

  • Example: Reading a file asynchronously in Node.js using fs module.

Add your answer

Q53. What is OO?

Ans.

OO stands for Object-Oriented. It is a programming paradigm that focuses on objects and their interactions.

  • OO is based on the concept of classes and objects.

  • It emphasizes encapsulation, inheritance, and polymorphism.

  • OO languages include Java, C++, Python, and Ruby.

  • OO design patterns are used to solve common problems in software development.

Add your answer

Q54. Implementation of game usign ReactJS.

Ans.

Implementing a game using ReactJS involves creating components for game elements, managing state, handling user interactions, and updating the UI.

  • Create separate components for game elements such as game board, player pieces, and score display.

  • Use React state to manage game state, such as player turns, scores, and game progress.

  • Handle user interactions, such as clicking on game pieces or buttons, to update game state.

  • Update the UI dynamically based on game state changes to pr...read more

Add your answer

Q55. Nodejs techniques.

Ans.

Node.js is a popular runtime environment for executing JavaScript code outside of a browser.

  • Node.js allows for asynchronous programming using callbacks, promises, and async/await.

  • Node.js has a large ecosystem of libraries and frameworks, such as Express for building web applications.

  • Node.js uses the CommonJS module system for organizing code into reusable modules.

Add your answer

Q56. Multiple MCQ on NodeJS Internals

Ans.

Multiple choice questions on NodeJS internals

  • Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a web browser.

  • It uses the V8 JavaScript engine from Google, which compiles JavaScript directly into machine code.

  • Node.js has a non-blocking, event-driven architecture that makes it lightweight and efficient for handling I/O operations.

  • Common Node.js internals topics include event loop, modules, buffers, streams, and err...read more

Add your answer

Q57. What are SOLID principles?

Ans.

SOLID principles are a set of five design principles that help make software designs more understandable, flexible, and maintainable.

  • S - Single Responsibility Principle: A class should have only one reason to change.

  • O - Open/Closed Principle: Software entities should be open for extension but closed for modification.

  • L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the functionality.

  • I - Interface ...read more

Add your answer

Q58. What is multi threading?

Ans.

Multi threading is a programming concept where multiple threads within a process execute concurrently, allowing for better performance and responsiveness.

  • Allows for parallel execution of tasks within a single process

  • Improves performance by utilizing multiple CPU cores

  • Can lead to synchronization issues if not handled properly

  • Examples include web servers handling multiple client requests simultaneously

Add your answer

Q59. Implent Oops concept of Java through code

Ans.

Java OOPs concepts can be implemented using classes, objects, inheritance, polymorphism, and encapsulation.

  • Create classes with attributes and methods

  • Instantiate objects from classes

  • Use inheritance to create subclasses

  • Implement polymorphism through method overriding

  • Encapsulate data using access modifiers

Add your answer

Q60. Code review of given java classes

Ans.

Reviewing Java classes for code quality and best practices

  • Check for proper naming conventions and readability of code

  • Ensure that the code follows SOLID principles and design patterns

  • Look for potential bugs, performance issues, and security vulnerabilities

  • Verify that the code is well-documented and includes appropriate comments

  • Evaluate the test coverage and quality of unit tests

Add your answer

Q61. Binary Search Algorithm

Ans.

Binary search is a divide and conquer algorithm that efficiently finds the target value within a sorted array.

  • Divide the array in half and compare the target value with the middle element

  • If the target value is smaller, search the left half. If larger, search the right half

  • Repeat the process until the target value is found or the subarray is empty

Add your answer

Q62. Valid Parenthesis String

Ans.

Check if a string of parentheses is valid

  • Use a stack to keep track of opening parentheses

  • Iterate through the string and push opening parentheses onto the stack

  • When encountering a closing parenthesis, pop from the stack and check if it matches the corresponding opening parenthesis

  • If stack is empty at the end and all parentheses have been matched, the string is valid

Add your answer

Q63. Problem Solving subsequence longest

Ans.

Find the longest subsequence in an array of strings

  • Iterate through the array of strings and compare each string with the next one to find the longest common subsequence

  • Use dynamic programming to efficiently find the longest common subsequence

  • Example: ['abc', 'abg', 'bdf', 'aeg', 'acefg'] - The longest subsequence is 'aeg'

Add your answer

Q64. Write down a code for server connection.

Ans.

Code for establishing a server connection in Node JS.

  • Use the 'http' module to create a server

  • Call the 'createServer' method with a callback function to handle requests

  • Listen on a specific port for incoming connections

Add your answer

Q65. How to detect deadlock

Ans.

Detecting deadlock involves analyzing the resource allocation graph and identifying circular wait conditions.

  • Check for circular wait conditions where processes are waiting for resources held by each other

  • Use resource allocation graph to visualize resource allocation and identify potential deadlocks

  • Implement deadlock detection algorithms like Banker's algorithm or wait-die algorithm

  • Monitor resource allocation and request patterns to proactively identify potential deadlocks

Add your answer

Q66. Brief about Java 8 with example

Ans.

Java 8 introduced new features like lambda expressions, streams, and functional interfaces.

  • Lambda expressions allow concise syntax for defining anonymous functions.

  • Streams provide a way to work with collections in a functional style.

  • Functional interfaces have a single abstract method and can be used with lambda expressions.

  • Example: Lambda expression - (a, b) -> a + b

  • Example: Stream usage - List names = Arrays.asList("Alice", "Bob"); names.stream().filter(name -> name.startsWi...read more

Add your answer

Q67. What are spring components

Ans.

Spring components are reusable software building blocks managed by the Spring framework.

  • Spring components are Java classes annotated with @Component or its specialized annotations like @Service, @Repository, @Controller.

  • These components are managed by the Spring IoC container and can be injected into other components using @Autowired annotation.

  • Spring components promote code reusability, modularity, and maintainability in Spring-based applications.

Add your answer

Q68. Why choose software testing

Ans.

Software testing ensures quality and reliability of software products.

  • Identifies defects and errors in software

  • Ensures software meets requirements and specifications

  • Improves user experience and satisfaction

  • Saves time and money by catching issues early

  • Increases confidence in software reliability

Add your answer

Q69. Explain Bug/defect life cycle.

Ans.

Bug/defect life cycle is a process of identifying, reporting, prioritizing, fixing, and verifying software defects.

  • Defect identification

  • Defect reporting

  • Defect prioritization

  • Defect fixing

  • Defect verification

Add your answer

Q70. Explain Binary search

Ans.

Binary search is a search algorithm that finds the position of a target value within a sorted array.

  • Divide the array into two halves and compare the target value with the middle element.

  • If the target value is less than the middle element, search the left half. If greater, search the right half.

  • Repeat the process until the target value is found or the subarray is empty.

Add your answer

Q71. A variant of bubble sort

Ans.

Cocktail sort is a variant of bubble sort that sorts in both directions.

  • Also known as bidirectional bubble sort or shaker sort.

  • It starts with the first element and compares it with the next one, swapping if necessary.

  • Then it moves to the last element and compares it with the previous one, swapping if necessary.

  • It continues until no more swaps are needed.

  • It is more efficient than bubble sort for large lists with many out-of-order elements.

Add your answer

Q72. ode working and its functionalities

Ans.

Code working and its functionalities

  • Code working refers to the process of writing, compiling, and executing code to achieve a desired outcome

  • Functionalities of code include data manipulation, logic implementation, and interaction with external systems

  • Examples of code working functionalities include sorting algorithms, database queries, and user interface design

Add your answer

Q73. Feature of Java 8

Ans.

Java 8 introduced lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions allow you to pass functionality as an argument to a method.

  • Functional interfaces have a single abstract method and can be used with lambda expressions.

  • Streams provide a way to work with sequences of elements efficiently.

  • Default methods allow interfaces to have methods with implementation.

  • Example: List names = Arrays.asList("Alice", "Bob", "Charlie"); names.forEach(name...read more

Add your answer

Q74. What is throw and throws

Ans.

throw is used to explicitly throw an exception in a method, while throws is used in method signature to declare the exceptions that can be thrown by the method.

  • throw keyword is used to throw an exception within a method.

  • throws keyword is used in method signature to declare the exceptions that can be thrown by the method.

  • Example: throw new Exception("Error message");

  • Example: public void method() throws IOException, SQLException {}

Add your answer

Q75. What is SOLD and explain

Ans.

SOLD stands for Software Object Linking and Embedding. It is a technology that allows objects to be linked or embedded in documents.

  • SOLD is a technology used in software development to link or embed objects in documents.

  • It allows for dynamic updating of linked objects in documents.

  • SOLD is commonly used in applications like Microsoft Office for embedding charts or tables in documents.

Add your answer

Q76. What is module ?

Ans.

A module in Node.js is a reusable block of code that encapsulates related functionality.

  • Modules help in organizing code into separate files for better maintainability.

  • Modules can be imported and used in other files using the 'require' function.

  • Node.js has a built-in module system that allows developers to create and use modules.

  • Examples of modules in Node.js include 'fs' for file system operations and 'http' for creating web servers.

Add your answer

Q77. Explain SAGA design pattern

Ans.

SAGA design pattern is used to manage distributed transactions in microservices architecture.

  • SAGA breaks down a transaction into a series of smaller, independent transactions.

  • Each step in the SAGA pattern is a separate transaction that can be rolled back if needed.

  • SAGA ensures eventual consistency by coordinating the transactions across multiple services.

  • Example: In an e-commerce application, SAGA can be used to handle the process of placing an order, processing payment, and ...read more

Add your answer

Q78. Least common ancestors tree

Ans.

Finding the least common ancestor of two nodes in a tree

  • Use a method like Lowest Common Ancestor (LCA) to find the least common ancestor of two nodes in a tree

  • Traverse the tree to find the paths from the root to each node, then compare the paths to find the LCA

  • Consider edge cases like when one node is the ancestor of the other or when one of the nodes is not in the tree

Add your answer

Q79. Explain all Oops concepts briefly

Ans.

Oops concepts are fundamental principles of object-oriented programming like inheritance, polymorphism, encapsulation, and abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class.

  • Polymorphism: Ability of objects to take on multiple forms based on the context.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features to ...read more

Add your answer

Q80. Csv parse using node.js

Ans.

Use the 'csv-parser' package in Node.js to easily parse CSV files.

  • Install the 'csv-parser' package using npm: npm install csv-parser

  • Require the 'csv-parser' module in your Node.js script: const csv = require('csv-parser')

  • Use the 'fs' module to read the CSV file and pipe it to the csv-parser module for parsing

  • Example: fs.createReadStream('data.csv').pipe(csv()).on('data', (row) => { console.log(row) })

Add your answer

Q81. System Design of hotel mgmt

Ans.

System design for hotel management including booking, check-in/out, room allocation, and payment processing.

  • Use a database to store information about rooms, bookings, guests, and payments.

  • Implement a booking system that allows guests to search for available rooms based on dates and preferences.

  • Include a check-in/out process that updates room availability and guest information.

  • Design a room allocation algorithm to optimize room usage and guest satisfaction.

  • Integrate a payment ...read more

Add your answer

Q82. Structure in c++

Ans.

Structure in C++ is a user-defined data type that allows grouping of variables of different data types under a single name.

  • Structures are used to create complex data types by grouping variables together.

  • They can contain variables of different data types.

  • Structures are defined using the 'struct' keyword.

  • Example: struct Person { string name; int age; };

  • Example: Person p1;

Add your answer

Q83. Callable vs runnable

Ans.

Callable and Runnable are both interfaces in Java used for executing tasks, but Callable can return a result and throw checked exceptions.

  • Callable interface in Java can return a result and throw checked exceptions, while Runnable cannot.

  • Callable interface is a part of java.util.concurrent package, while Runnable is a part of java.lang package.

  • Callable interface is used with ExecutorService to submit tasks for execution and retrieve the result, while Runnable is used with Thre...read more

Add your answer

Q84. Node process efficiency

Add your answer

Q85. Features of Java8

Ans.

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

  • Lambda expressions allow you to write code in a more concise and readable way.

  • Streams provide a way to work with collections of objects in a functional style.

  • Functional interfaces are interfaces with a single abstract method, used for lambda expressions.

  • Default methods allow interfaces to have method implementations.

  • The new Date and Time API provides better...read more

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

Interview Process at Dr.B.C.Roy Engineering College

based on 74 interviews in the last 1 year
Interview experience
4.4
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.8
 • 3k Interview Questions
4.0
 • 613 Interview Questions
4.2
 • 207 Interview Questions
3.4
 • 138 Interview Questions
4.2
 • 137 Interview Questions
View all
Top ZeMoSo Technologies Interview Questions And Answers
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
Get AmbitionBox app

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