Premium Employer

ServiceNow

4.2
based on 376 Reviews
Filter interviews by

90+ Regency group Interview Questions and Answers

Updated 15 Nov 2024
Popular Designations

Q1. Set Matrix Zeros Problem Statement

Given an N x M integer matrix, if an element is 0, set its entire row and column to 0's, and return the matrix. Specifically, if a cell has a value 0 (i.e., matrix[i][j] == 0)...read more

View 2 more answers

Q2. Pascal's Triangle Problem Statement

You are provided with an integer N. The objective is to return a 2-dimensional list representing Pascal’s triangle up to row N.

A Pascal's triangle is a triangular array wher...read more

Add your answer

Q3. Pythagorean Triplets Detection

Determine if an array contains a Pythagorean triplet by checking whether there are three integers x, y, and z such that x2 + y2 = z2 within the array.

Input:

The first line contai...read more
Add your answer

Q4. K-th Smallest Element in BST

Your task is to find the ‘K-th’ smallest element in a given Binary Search Tree (BST).

Explanation:

A Binary Search Tree is a binary tree in which for each node, all elements in the ...read more

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

Q5. Find product of each element of an array except that element in O(N) time complexity without using / operation

Ans.

Find product of each element of an array except that element in O(N) time complexity without using / operation

  • Use prefix and suffix products

  • Multiply prefix and suffix products for each element to get the final product

  • Handle edge cases where array has 0 or 1 element separately

Add your answer

Q6. Design a system for putting newspapers using classes and functions taking different aspects into account

Ans.

Design a system for putting newspapers using classes and functions

  • Create a Newspaper class with attributes like title, date, and content

  • Create a Publisher class with methods to publish and distribute newspapers

  • Create a Subscriber class with methods to subscribe and receive newspapers

  • Use inheritance to create different types of newspapers like daily, weekly, etc.

  • Implement a database to store newspaper information and handle subscriptions

Add your answer
Are these interview questions helpful?

Q7. Median of 2 sorted arrays in O(log N) time complexity and O(1) space complexity

Ans.

Find median of 2 sorted arrays in O(log N) time complexity and O(1) space complexity

  • Use binary search to find the partition point in both arrays

  • Calculate the median based on the partition point and array sizes

  • Adjust the partition points based on the median value

  • Repeat until the partition points are at the median

  • Handle edge cases such as empty arrays and uneven array sizes

Add your answer

Q8. Shortest path between 2 points in 2-D space in O(log N) time

Ans.

There is no known algorithm to find shortest path in 2-D space in O(log N) time.

  • The best known algorithm for finding shortest path in 2-D space is Dijkstra's algorithm which has a time complexity of O(N^2).

  • Other algorithms like A* and Bellman-Ford have better time complexity but still not O(log N).

  • If the points are on a grid, Lee algorithm can be used which has a time complexity of O(N).

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

Q9. Reverse level order traversal of a tree using Queue

Ans.

Reverse level order traversal of a tree using Queue

  • Create a queue and push the root node into it

  • While the queue is not empty, pop the front node and push its children into the queue

  • Add the popped node to a stack

  • Once the queue is empty, pop elements from the stack and print them

Add your answer

Q10. Given a container and 3 shapes of balls small , medium , large using each type of ball at least once how do you fit these balls so that the space wasted is minimized he was looking for a programmatic way of sol...

read more
Ans.

Programmatically fit small, medium, and large balls in a container to minimize wasted space.

  • Start by calculating the volume of the container.

  • Calculate the volume of each type of ball.

  • Use a loop to try all possible combinations of balls.

  • Calculate the total volume of each combination and keep track of the one with the least wasted space.

  • Return the combination with the least wasted space.

Add your answer

Q11. Explain event loop, what are different types of queues in event loop

Ans.

Event loop is a mechanism that allows for asynchronous execution of code by managing the order of events in a single thread.

  • Event loop continuously checks the call stack for any functions that need to be executed, and processes them in a non-blocking manner.

  • Different types of queues in event loop include microtask queue (Promise callbacks), macrotask queue (setTimeout, setInterval callbacks), and animation frame queue (requestAnimationFrame callbacks).

Add your answer

Q12. Difference between Floyd Warshall and Djikstra

Ans.

Floyd Warshall finds shortest path between all pairs of vertices while Djikstra finds shortest path from a single source.

  • Floyd Warshall is used for dense graphs while Djikstra is used for sparse graphs.

  • Floyd Warshall has a time complexity of O(n^3) while Djikstra has a time complexity of O((n+m)logn).

  • Floyd Warshall can handle negative edge weights while Djikstra cannot.

  • Floyd Warshall can detect negative cycles while Djikstra cannot.

Add your answer

Q13. If a variable is protected in parent class and another variable with same name with public is declared in child class is this allowed is the reverse also allowed and how would you access parents variable in chi...

read more
Ans.

Yes, it is allowed. Access parent's variable using 'super' keyword.

  • Child class can have a variable with the same name as parent's protected variable.

  • Access parent's variable in child class using 'super' keyword.

  • Reverse is not allowed i.e. parent cannot have a public variable with the same name as child's protected variable.

Add your answer

Q14. Level order traversal of a tree using Queue

Ans.

Level order traversal of a tree using Queue

  • Create a queue and add the root node to it

  • While the queue is not empty, remove the front node and print its value

  • Add the left and right child nodes of the removed node to the queue

  • Repeat until the queue is empty

Add your answer

Q15. There are 9 balls one ball is lighter out of them and we have a balance how would you find lighter ball in 2 weightings? (I told i knew this question so he moved on)

Ans.

Find the lighter ball among 9 balls in 2 weightings using a balance.

  • Divide the balls into 3 groups of 3 each.

  • Weigh any 2 groups against each other.

  • If they balance, the lighter ball is in the third group.

  • If they don't balance, the lighter ball is in the lighter group.

  • Take 2 balls from the lighter group and weigh them against each other.

  • If they balance, the lighter ball is the remaining one.

  • If they don't balance, the lighter ball is the lighter one.

Add your answer

Q16. Recursively deleting linked list from end

Ans.

Recursively delete a linked list from the end.

  • Start from the head and recursively traverse to the end of the list.

  • Delete the last node and set the second last node's next pointer to null.

  • Repeat until the entire list is deleted.

  • Use a recursive function to implement the deletion process.

Add your answer

Q17. Minimum number of platforms required for a railway station.

Ans.

Minimum 2 platforms required for a railway station.

  • At least 2 platforms are required for trains to arrive and depart simultaneously.

  • Additional platforms may be required based on the frequency of trains and passenger traffic.

  • Platforms should be long enough to accommodate the longest trains that will use the station.

  • Platforms should also have appropriate facilities for passengers, such as seating, shelter, and signage.

Add your answer

Q18. what is the difference between microprocessor and microcontroler ? give an example for each and what is intel i7 ?

Add your answer

Q19. How will you get the data in the table using js? what are the other ways to print the output? what is a block in js?

Ans.

To get data in a table using js, you can use DOM manipulation methods like getElementById or querySelector. Other ways to print output include console.log and innerHTML. A block in js is a set of statements enclosed in curly braces.

  • Use getElementById or querySelector to get data in a table using js

  • Other ways to print output include console.log and innerHTML

  • A block in js is a set of statements enclosed in curly braces, used to group code together

Add your answer

Q20. Strings Anagram in O(1) space complexity

Ans.

Anagram of strings in O(1) space complexity

  • Use a fixed size array of integers to store the frequency of characters in the first string

  • Iterate through the second string and decrement the frequency of each character in the array

  • If all the frequencies are zero, then the strings are anagrams

  • Return true or false accordingly

Add your answer

Q21. Find if a given regex (containing ., * and lower case english chars) matches a given string.

Ans.

Use regex library to match given regex with string.

  • Use a regex library like re in Python to match the given regex with the string.

  • Check if the regex matches the string using the library functions.

  • Handle cases where the regex contains special characters like . and * appropriately.

Add your answer

Q22. Find squares of elements in a sorted array and return the sorted response.

Ans.

Sort the squares of elements in a sorted array and return the sorted response.

  • Iterate through the array and square each element.

  • Store the squared values in a new array.

  • Sort the new array and return it.

Add your answer

Q23. How do we find count of numbers between (a,b) both inclusive with no consecutive ones in the binary representation? They asked me 3 different approaches for this problem

Ans.

Count numbers between (a,b) with no consecutive ones in binary representation.

  • Use dynamic programming to count numbers with no consecutive ones.

  • Calculate count of numbers with no consecutive ones up to b and a-1.

  • Subtract the counts to get the final answer.

Add your answer

Q24. Set of numbers from an array that can form nearest sum to the given number

Ans.

Find set of numbers from an array that can form nearest sum to the given number.

  • Sort the array in ascending order

  • Use two pointers approach to find the nearest sum

  • Return the set of numbers

Add your answer

Q25. Difference between abstract class and interface what is the problem if I use abstract class when there are no implemented methods?

Ans.

Abstract class can have implemented methods, interface cannot. Using abstract class without implemented methods is unnecessary.

  • Abstract class can have constructors, fields, and implemented methods, while interface cannot.

  • Abstract class can be used to provide default implementations for methods that subclasses can override.

  • Interface is used to define a contract that implementing classes must follow.

  • Using abstract class without implemented methods is unnecessary and can be repl...read more

Add your answer

Q26. Find longest palindromic substring in a given string.

Ans.

Use dynamic programming to find the longest palindromic substring in a given string.

  • Iterate through the string and expand around each character to find palindromes.

  • Store the length of the longest palindrome found so far.

  • Return the substring based on the start and end indices of the longest palindrome.

Add your answer

Q27. Explain about throttling and implement throttle function.

Ans.

Throttling is a technique used to control the rate of requests sent to a server.

  • Throttling helps prevent server overload by limiting the number of requests processed at a time.

  • Implementing a throttle function involves setting a maximum request rate and delaying excess requests.

  • Example: Implementing a throttle function in a web application to limit the number of API calls made to a third-party service.

  • Example: Throttling the rate of data transfer in a network to prevent conges...read more

Add your answer

Q28. Write a short promise example and implement your own promise

Ans.

A promise is a commitment to do something in the future, typically used for asynchronous operations in JavaScript.

  • Promises are used to handle asynchronous operations in JavaScript.

  • They represent a value that may be available now, in the future, or never.

  • Promises have three states: pending, fulfilled, or rejected.

  • Example: new Promise((resolve, reject) => { setTimeout(() => resolve('Done!'), 1000); });

Add your answer

Q29. In a circularly linked list how would you ensure at least one node is left always even if you remove all the nodes ?

Ans.

To ensure at least one node is left in a circularly linked list, we can use a sentinel node.

  • Create a sentinel node and point it to the last node in the list.

  • When removing a node, check if it is the last node. If it is, remove it and point the sentinel node to the new last node.

  • If all nodes are removed, the sentinel node will still be present.

  • Example: If we have a circularly linked list with nodes A, B, and C, we can create a sentinel node S and point it to C. If we remove nod...read more

Add your answer

Q30. How to reduce the time of booting of the processor where we have no control on hardware devices but can only modify software (he was looking for more points here)?

Ans.

To reduce booting time of processor with no control on hardware, modify software by disabling unnecessary services and programs.

  • Disable unnecessary services and programs

  • Optimize startup programs

  • Remove malware and viruses

  • Update drivers and software

  • Defragment hard drive

Add your answer

Q31. How to solve the error in the code? what is scope? what are logical operators?

Ans.

Scope refers to the visibility and accessibility of variables in a program. Logical operators are used to perform logical operations in code.

  • Scope in programming refers to where in the code a variable can be accessed. It can be global, local, or block scope.

  • To solve an error in the code, first identify the error message or behavior causing the issue. Then, debug the code by checking for syntax errors, logical errors, or runtime errors.

  • Logical operators in programming are used...read more

Add your answer

Q32. BFS and DFS Difference

Ans.

BFS and DFS are graph traversal algorithms. BFS explores nodes level by level while DFS explores nodes depth by depth.

  • BFS uses a queue while DFS uses a stack or recursion.

  • BFS is optimal for finding shortest path while DFS is optimal for finding a path between two nodes.

  • BFS requires more memory as it stores all the nodes at each level while DFS requires less memory.

  • BFS can be used to find connected components while DFS can be used to detect cycles in a graph.

Add your answer

Q33. Recursively deleting linked list

Ans.

Recursively delete a linked list

  • Create a recursive function that takes the head of the linked list as input

  • Base case: if the head is null, return

  • Recursively call the function with the next node as input

  • Delete the current node

Add your answer

Q34. Least cost to travel from source to destination(DP problem)

Ans.

The problem is to find the least cost to travel from source to destination using dynamic programming.

  • Use dynamic programming to solve the problem

  • Create a 2D array to store the minimum cost to reach each cell

  • Fill the array using the recurrence relation: minCost[i][j] = cost[i][j] + min(minCost[i-1][j], minCost[i][j-1], minCost[i-1][j-1])

  • The final answer will be stored in minCost[m][n], where m and n are the coordinates of the destination

  • Example: Given a grid with costs to trav...read more

Add your answer

Q35. How to serialize and deserialise a tree

Ans.

To serialize and deserialize a tree, use a recursive approach to traverse the tree and store the data in a suitable format.

  • Use pre-order traversal to serialize the tree by storing the node values in a list or string.

  • For deserialization, reconstruct the tree by recursively building nodes from the serialized data.

  • Consider using JSON or XML format for serialization to easily store and retrieve tree structure.

Add your answer

Q36. What is virtual DOM and why its faster

Ans.

Virtual DOM is a lightweight copy of the actual DOM, used to improve performance by minimizing direct manipulation of the real DOM.

  • Virtual DOM is a concept used in frameworks like React to optimize rendering performance.

  • Changes are first made to the virtual DOM, which is then compared to the real DOM to identify the minimal updates needed.

  • This approach reduces the number of actual DOM manipulations, resulting in faster rendering.

  • Example: React uses virtual DOM to efficiently ...read more

Add your answer

Q37. Write topological sort in directed acyclic graph

Ans.

Topological sort is a linear ordering of vertices in a directed acyclic graph where for every directed edge uv, vertex u comes before vertex v.

  • Create a list to store the topological ordering of vertices.

  • Find a vertex with no incoming edges and add it to the list.

  • Remove the vertex and its outgoing edges from the graph.

  • Repeat the process until all vertices are added to the list.

Add your answer

Q38. Detecting a loop in a singly linked list what are the stopping condition if there is no loop?

Ans.

Stopping conditions for detecting a loop in a singly linked list if there is no loop.

  • If the current node or the next node is null, then there is no loop.

  • If the current node is the last node in the list, then there is no loop.

  • If the list has only one node, then there is no loop.

Add your answer

Q39. Recursively deleting from end

Ans.

Recursively delete elements from the end of an array.

  • Create a recursive function that removes the last element of the array.

  • Call the function recursively until the desired number of elements are removed.

  • Handle edge cases such as empty arrays and removing more elements than the array contains.

Add your answer

Q40. Recursively deleting tree

Ans.

Recursively delete a tree by deleting all its child nodes and then the parent node.

  • Start from the leaf nodes and delete them first.

  • Then move up to the parent nodes and delete them.

  • Repeat until the root node is deleted.

  • Use post-order traversal to ensure child nodes are deleted before parent nodes.

Add your answer

Q41. N meetings Find sub Array sum 0

Ans.

Given an array of N meetings, find a subarray with sum 0.

  • Use a hash table to store the cumulative sum of the array elements.

  • If the same sum is encountered again, it means the subarray between the two indices has a sum of 0.

  • Handle edge cases like when the subarray starts from index 0 or when the subarray ends at the last index.

Add your answer

Q42. write an algo for tower on hanoi in 7 steps

Ans.

The Tower of Hanoi is a classic problem that involves moving disks from one peg to another, following specific rules.

  • Start by moving the top n-1 disks from the source peg to the auxiliary peg.

  • Move the largest disk from the source peg to the target peg.

  • Move the n-1 disks from the auxiliary peg to the target peg.

  • Repeat the process recursively for the n-1 disks on the auxiliary peg.

  • Continue until all disks are moved to the target peg.

Add your answer

Q43. difference between functional and oo approach of problem solving . why oops is best

Add your answer

Q44. Difference between object oriented programming, functional programming, logic programming ?

Ans.

Object-oriented programming focuses on objects and their interactions, functional programming emphasizes on functions and their composition, and logic programming uses logical rules to solve problems.

  • Object-oriented programming uses classes and objects to encapsulate data and behavior.

  • Functional programming uses pure functions and immutable data to avoid side effects.

  • Logic programming uses logical rules and constraints to solve problems.

  • Examples of object-oriented programming...read more

Add your answer

Q45. Executable Code to Detect a Loop in a Singly Linked List without any mistake in first time with all boundry cases if any

Ans.

Use Floyd's Cycle Detection Algorithm to detect a loop in a singly linked list.

  • Use two pointers, one moving at twice the speed of the other.

  • If there is a loop, the two pointers will eventually meet.

  • Handle boundary cases like an empty list or a list with only one node.

Add your answer

Q46. Given a String contains only 0s, 1s and 2s, count the number of sub strings that have equal number of 0s, 1s, and 2s. Input : str = "0102010" output : 2. Very Hard question is being asked in interview for the Q...

read more
Ans.

Count the number of substrings with equal number of 0s, 1s, and 2s in a given string.

  • Iterate through the string and maintain counts of 0s, 1s, and 2s encountered so far.

  • Keep track of the counts in a hashmap and increment the count of substrings whenever counts of 0s, 1s, and 2s are equal.

  • Return the total count of substrings at the end.

Add your answer

Q47. Group of anagrams together. input : ["eat", "tea", "tan", "ate", "nat", "bat"] output : [["eat" ,"tea", "ate"],["tan", "nat"],["bat"]] This is another hard level question is asked in interview for the QA positi...

read more
Ans.

Group anagrams together in an array of strings.

  • Create a hashmap to store sorted strings as keys and corresponding anagrams as values.

  • Iterate through the input array, sort each string, and add it to the hashmap.

  • Return the values of the hashmap as the grouped anagrams.

Add your answer

Q48. How to adopt on data challenges?

Ans.

Adopting to data challenges requires a strategic approach and a willingness to learn and adapt.

  • Identify the specific data challenges and prioritize them based on their impact on pricing decisions

  • Develop a data management plan to ensure data accuracy, completeness, and consistency

  • Invest in data analytics tools and technologies to extract insights from data

  • Collaborate with cross-functional teams to ensure alignment on data-driven pricing strategies

  • Continuously monitor and evalu...read more

Add your answer

Q49. How service management adds to customer experience.

Ans.

Service management enhances customer experience by ensuring efficient and effective delivery of services.

  • Service management helps in setting clear service expectations with customers.

  • It ensures timely and consistent delivery of services, leading to customer satisfaction.

  • Service management also involves handling customer feedback and complaints effectively.

  • By optimizing service processes, service management can improve overall customer experience.

  • Examples: Implementing a ticke...read more

Add your answer

Q50. Space and time complexity to “Detecting a Loop in a Singly Linked List ”

Ans.

Space complexity O(1), time complexity O(n)

  • Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time

  • If there is a loop, the two pointers will eventually meet at the same node

  • Space complexity is O(1) as only two pointers are used, time complexity is O(n) as worst case is traversing the entire list

Add your answer

Q51. Tell us about one product owned and built from scratch

Ans.

Developed a mobile app for tracking daily water intake

  • Conducted user research to identify pain points and desired features

  • Designed wireframes and user interface using Sketch

  • Collaborated with developers to build and test the app

  • Implemented features such as reminders and progress tracking

  • Launched the app on both iOS and Android platforms

Add your answer

Q52. Simple problem solving skills. For example given coordinates find the area of triangle.

Ans.

To find the area of a triangle given coordinates, use the formula: (1/2) * base * height

  • Identify the coordinates of the three vertices of the triangle

  • Calculate the length of each side of the triangle using the distance formula

  • Use Heron's formula or the formula (1/2) * base * height to calculate the area

Add your answer

Q53. What is the difference between Adam optimizer and Gradient Descent Optimizer?

Ans.

Adam optimizer is an extension to the Gradient Descent optimizer with adaptive learning rates and momentum.

  • Adam optimizer combines the benefits of both AdaGrad and RMSProp optimizers.

  • Adam optimizer uses adaptive learning rates for each parameter.

  • Gradient Descent optimizer has a fixed learning rate for all parameters.

  • Adam optimizer includes momentum to speed up convergence.

  • Gradient Descent optimizer updates parameters based on the gradient of the entire dataset.

  • Example: Adam o...read more

Add your answer

Q54. Move all zero to end & design Google photos life application

Ans.

Move all zeros to end of array & design Google Photos life application

  • Iterate through the array and move all zeros to the end

  • Design a user-friendly interface for Google Photos life application

  • Implement features like automatic photo backup, organization, and sharing

  • Utilize machine learning for image recognition and categorization

Add your answer

Q55. Level order traversal of Binary tree

Ans.

Level order traversal of Binary tree

  • Use a queue to traverse the tree level by level

  • Enqueue the root node and then dequeue it and enqueue its children

  • Repeat until the queue is empty

Add your answer

Q56. What is sql joins and normalization

Ans.

SQL joins are used to combine rows from two or more tables based on a related column, while normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • SQL joins are used to retrieve data from multiple tables based on a related column

  • Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity

  • Types of SQL joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN

  • Normalizatio...read more

Add your answer

Q57. Overlapping circular linked list problem.

Ans.

Detect if two circular linked lists overlap

  • Traverse both lists and check if they have the same tail node

  • If they have different tail nodes, they do not overlap

  • If they have the same tail node, check if they intersect at any point

  • Use Floyd's cycle-finding algorithm to detect intersection point

Add your answer

Q58. Low level Design of hashmap

Ans.

Hashmap is a data structure that stores key-value pairs and allows for quick retrieval of values based on keys.

  • Hashmap is typically implemented using an array of linked lists or a balanced binary search tree.

  • Each key is hashed to determine its index in the array, where the corresponding value is stored.

  • Collision handling is important in hashmap design to address cases where multiple keys hash to the same index.

  • Hashing function should be efficient to distribute keys evenly acr...read more

Add your answer

Q59. what are the different types of joins

Ans.

Different types of joins include inner join, outer join, left join, and right join.

  • Inner join: Returns rows when there is a match in both tables

  • Outer join: Returns all rows when there is a match in one of the tables

  • Left join: Returns all rows from the left table and the matched rows from the right table

  • Right join: Returns all rows from the right table and the matched rows from the left table

Add your answer

Q60. how to find errors in log files in linux

Ans.

Errors in log files in Linux can be found by searching for keywords, timestamps, and error codes.

  • Use 'grep' command to search for specific keywords or error codes in log files

  • Look for timestamps to identify when errors occurred

  • Check for any error messages or warnings that may indicate issues

  • Use 'tail' command to view the end of log files for recent errors

  • Consider using 'journalctl' command for system logs in systemd-based Linux distributions

Add your answer

Q61. Write test cases for Prime customers in Amazon Big Billion Day

Ans.

Test cases for Prime customers in Amazon Big Billion Day

  • Verify that Prime customers have access to exclusive deals and discounts

  • Check if Prime customers receive faster shipping options compared to non-Prime customers

  • Ensure that Prime customers are able to access Prime Day deals and promotions

  • Confirm that Prime customers receive special perks such as early access to deals

Add your answer

Q62. what are troubleshooting steps for network

Ans.

Troubleshooting steps for network issues

  • Check physical connections (cables, ports)

  • Verify network settings (IP address, subnet mask)

  • Restart networking devices (modem, router)

  • Run network diagnostics tools (ping, traceroute)

  • Check for software conflicts or firewall issues

Add your answer

Q63. how to tune a sql query?

Ans.

Tuning a SQL query involves optimizing its performance by adjusting various factors.

  • Identify slow performing queries using tools like SQL Profiler or Execution Plan.

  • Optimize query structure by using appropriate indexes and avoiding unnecessary joins.

  • Consider rewriting the query to use more efficient techniques like subqueries or CTEs.

  • Update statistics on tables involved in the query to ensure accurate query execution plan.

  • Limit the result set by using WHERE clause effectively...read more

Add your answer

Q64. Trapping Rain water problem

Ans.

Trapping Rain Water Problem

  • The problem involves calculating the amount of water trapped between bars in a histogram

  • The solution involves finding the maximum height of bars on both sides of each bar and subtracting the height of the bar itself

  • This can be done using two arrays to store the maximum height of bars on the left and right side of each bar

Add your answer

Q65. Find if Linked list is circular

Ans.

Check if a linked list is circular by using two pointers moving at different speeds.

  • Initialize two pointers, slow and fast, both pointing to the head of the linked list.

  • Move slow pointer by one node and fast pointer by two nodes in each iteration.

  • If the fast pointer reaches the end of the list or meets the slow pointer, the list is circular.

Add your answer

Q66. Four oops pillars and its code also.

Ans.

The four pillars of object-oriented programming are encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class). Example: private variables in a class.

  • Inheritance: Creating new classes based on existing classes, inheriting their attributes and methods. Example: a 'Dog' class inheriting from an 'Animal' class.

  • Polymorphism: The ability for objects of different classes to respond to the sa...read more

Add your answer

Q67. What do you know about Credit Card Transaction lifecycle

Ans.

Credit card transaction lifecycle involves authorization, clearing, and settlement processes.

  • Authorization: Initial approval of the transaction by the card issuer.

  • Clearing: The process of exchanging transaction details between the merchant and the card issuer.

  • Settlement: The final transfer of funds from the cardholder's account to the merchant's account.

  • Chargeback: A reversal of a transaction due to disputes or fraud.

  • Interchange fees: Fees paid between the merchant's bank and...read more

Add your answer

Q68. Program to convert a given number into words

Ans.

A program to convert a given number into words.

  • Use a switch statement or if-else conditions to handle different cases for each digit

  • Break down the number into individual digits and convert each digit into its corresponding word

  • Handle special cases like numbers between 10 and 19 separately

  • Consider adding support for negative numbers and decimal places if required

Add your answer
Asked in
SSE Interview

Q69. System Design some feature in a social media platform.

Ans.

Implementing a 'Close Friends' feature in a social media platform.

  • Allow users to create a list of close friends to share exclusive content with

  • Provide options for users to customize privacy settings for their close friends list

  • Include a notification feature for when a user is added to someone else's close friends list

Add your answer

Q70. What is shell in linux?

Ans.

Shell in Linux is a command-line interpreter that allows users to interact with the operating system by executing commands.

  • Shell is a program that takes commands from the keyboard and gives them to the operating system to perform.

  • It can also be used to automate tasks by writing scripts.

  • Common shells in Linux include Bash, Zsh, and Ksh.

  • Shell scripting allows users to write programs that can be executed by the shell.

  • Examples of shell commands include ls (list files), cd (change...read more

Add your answer

Q71. what is vpc and why it is needed

Ans.

VPC stands for Virtual Private Cloud, it is needed to securely isolate resources within the cloud environment.

  • VPC allows you to create a private network in the cloud.

  • It provides control over network settings such as IP address range, subnets, route tables, and network gateways.

  • VPC helps in securing resources by setting up security groups and network access control lists.

  • It enables you to connect your on-premises network to the cloud using VPN or Direct Connect.

  • VPC is essentia...read more

Add your answer

Q72. what are the types of lookup tables

Ans.

Types of lookup tables include direct mapping, associative arrays, and hash tables.

  • Direct mapping: uses a key to directly access the corresponding value in the table

  • Associative arrays: store key-value pairs where keys are unique

  • Hash tables: use a hash function to map keys to values for efficient retrieval

Add your answer

Q73. Check if the sentence is palindrome or not

Ans.

To check if a sentence is a palindrome, compare it with its reverse form.

  • Remove all non-alphanumeric characters and convert the sentence to lowercase.

  • Reverse the sentence and compare it with the original sentence to check for palindrome.

  • Example: 'A man, a plan, a canal, Panama' becomes 'amanaplanacanalpanama' after removing non-alphanumeric characters and converting to lowercase.

Add your answer

Q74. what is a software lifecycle phase?

Ans.

Software lifecycle phase refers to the stages of software development from conception to retirement.

  • Software lifecycle phases include planning, design, development, testing, deployment, and maintenance.

  • Each phase has specific goals and deliverables that must be met before moving on to the next phase.

  • For example, in the planning phase, the project scope and requirements are defined, while in the testing phase, the software is tested for bugs and errors.

  • The software lifecycle p...read more

Add your answer

Q75. what is microcontroller ?

Ans.

A microcontroller is a small computer on a single integrated circuit that contains a processor core, memory, and programmable input/output peripherals.

  • Microcontrollers are used in various applications such as embedded systems, robotics, and automation.

  • They are designed to execute specific tasks and are often used in devices that require real-time control.

  • Examples of microcontrollers include Arduino boards, PIC microcontrollers, and STM32 microcontrollers.

Add your answer
Asked in
SDE Interview

Q76. what is storage differnece for files in ram

Ans.

Files in RAM are stored temporarily for quick access by the CPU.

  • RAM (Random Access Memory) is volatile memory used for temporary storage of data and instructions.

  • Files stored in RAM are accessed much faster than files stored on a hard drive.

  • RAM is cleared when the computer is turned off, so files stored in RAM are not persistent.

  • Examples of files stored in RAM include open applications, running processes, and cached data.

Add your answer

Q77. Pollyfill for .reduce & Promise

Ans.

Polyfill for .reduce & Promise

  • For .reduce polyfill, create a function that takes an array, a callback function, and an initial value as arguments

  • Inside the function, loop through the array and apply the callback function to each element, updating the accumulator

  • For Promise polyfill, create a function that takes a callback function with resolve and reject parameters

  • Inside the function, call the callback function with resolve and reject as arguments based on the asynchronous op...read more

Add your answer

Q78. When to use Relu and when not?

Ans.

Use ReLU for hidden layers in deep neural networks, avoid for output layers.

  • ReLU is commonly used in hidden layers to introduce non-linearity and speed up convergence.

  • Avoid using ReLU in output layers for regression tasks as it can lead to vanishing gradients.

  • Consider using Leaky ReLU or Sigmoid for output layers depending on the task.

  • ReLU is computationally efficient and helps in preventing the vanishing gradient problem.

  • ReLU is not suitable for tasks where negative values a...read more

Add your answer

Q79. what is microprocessor ?

Add your answer

Q80. Difference between arraylist and LinkedInlist

Ans.

ArrayList is a resizable array implementation while LinkedList is a doubly linked list implementation.

  • ArrayList uses dynamic arrays to store elements, allowing fast random access but slower insertion and deletion.

  • LinkedList uses nodes with pointers to the next and previous elements, allowing fast insertion and deletion but slower random access.

  • Example: ArrayList - List names = new ArrayList<>(); LinkedList - List cities = new LinkedList<>();

Add your answer

Q81. Get all the characters in a String

Ans.

To get all the characters in a String, you can convert the String to an array of characters.

  • Convert the String to a char array using the toCharArray() method

  • Iterate through the char array to get each character

  • Store each character in a String array

Add your answer

Q82. Write a function to return unique numbers

Ans.

A function to return unique numbers from an array of strings.

  • Convert the array of strings to an array of numbers.

  • Use a Set to store unique numbers.

  • Convert the Set back to an array and return it.

Add your answer

Q83. what is load balancer

Ans.

A load balancer is a device or software that distributes network or application traffic across multiple servers to ensure no single server is overwhelmed.

  • Balances traffic across multiple servers

  • Improves performance and reliability

  • Can be hardware or software based

  • Examples: F5 BIG-IP, NGINX, HAProxy

Add your answer

Q84. what is IAM and policies

Ans.

IAM stands for Identity and Access Management. Policies are rules that determine who has access to what resources.

  • IAM is a framework for managing digital identities and controlling access to resources

  • IAM policies are rules that define the permissions and access levels for different users or groups

  • IAM policies can be attached to users, groups, or resources to control access

  • IAM helps organizations ensure that only authorized individuals have access to their systems and data

Add your answer

Q85. What is Regression Testing?

Ans.

Regression testing is the process of retesting a software application to ensure that new code changes have not adversely affected existing functionality.

  • Performed after code changes to ensure that existing features still work correctly

  • Helps in identifying and fixing any defects introduced by new code changes

  • Automated tools like Selenium can be used for regression testing

  • Examples: Testing a login feature after adding a new payment option

View 1 answer

Q86. Are you good at coding?

Ans.

Yes, I am good at coding.

  • Proficient in multiple programming languages such as Java, Python, and C++

  • Experience in developing and maintaining complex software systems

  • Strong problem-solving and debugging skills

  • Familiarity with software development best practices and version control systems

Add your answer

Q87. what is a stack?

Ans.

A stack is a data structure that follows the Last In, First Out (LIFO) principle, where elements are added and removed from the top.

  • Elements are added to the top of the stack and removed from the top as well

  • Common operations on a stack include push (add element) and pop (remove element)

  • Examples of stacks include the call stack in programming and a stack of plates

Add your answer

Q88. How you manage dependencies

Ans.

I manage dependencies by identifying, tracking, and communicating them effectively.

  • Identify all dependencies early on in the project

  • Create a dependency matrix to track relationships

  • Regularly communicate with stakeholders to ensure dependencies are being managed effectively

Add your answer

Q89. what is DNS server

Ans.

DNS server is a system that translates domain names to IP addresses, allowing users to access websites using human-readable names.

  • DNS servers store a database of domain names and their corresponding IP addresses.

  • When a user enters a domain name in a web browser, the DNS server is queried to find the corresponding IP address.

  • DNS servers help in the efficient routing of internet traffic by translating domain names to IP addresses.

  • Examples of popular DNS servers include Google D...read more

Add your answer

Q90. Use of static keyword

Ans.

The static keyword in programming is used to declare variables, methods, or classes that belong to the class itself rather than instances of the class.

  • Static variables are shared among all instances of a class.

  • Static methods can be called without creating an instance of the class.

  • Static classes cannot be instantiated and are used for grouping related methods and variables.

  • Example: public static int count = 0; // static variable

Add your answer

Q91. WHAT IS INCIDENT MANAGMENT

Ans.

Incident management is the process of identifying, analyzing, and resolving incidents to minimize their impact on business operations.

  • Incident management involves documenting incidents, categorizing them based on severity, and prioritizing them for resolution.

  • It includes creating incident tickets, assigning them to appropriate teams or individuals, and tracking their progress until resolution.

  • Examples of incidents include network outages, software crashes, security breaches, ...read more

Add your answer

Q92. Implementation of trees ,stacks .

Ans.

Trees and stacks are fundamental data structures used in software engineering for organizing and storing data efficiently.

  • Trees are hierarchical data structures with nodes connected by edges. Examples include binary trees, AVL trees, and B-trees.

  • Stacks are linear data structures that follow the Last In First Out (LIFO) principle. Examples include function call stack and undo/redo stack.

Add your answer

Q93. Reverse a linked list

Ans.

Reverse a linked list by changing the direction of pointers

  • Start with three pointers: current, previous, and next

  • Iterate through the linked list, updating pointers to reverse the direction

  • Return the new head of the reversed linked list

Add your answer

Q94. Project description and review

Ans.

Developed a web application for tracking project progress and performance.

  • Implemented user authentication and authorization using JWT tokens

  • Utilized React for front-end development and Node.js for back-end development

  • Integrated with third-party APIs for data visualization

  • Used MongoDB for database management

Add your answer

Q95. WHAT IS LINUX OS

Ans.

Linux OS is an open-source operating system based on the Linux kernel, known for its stability, security, and flexibility.

  • Open-source operating system

  • Based on the Linux kernel

  • Known for stability, security, and flexibility

Add your answer

Q96. qualification i have right now

Ans.

I have a Bachelor's degree in Business Administration and 5 years of experience in administrative roles.

  • Bachelor's degree in Business Administration

  • 5 years of experience in administrative roles

Add your answer

Q97. Build a side panel

Ans.

To build a side panel, you will need to design, measure, cut, assemble, and attach the panel to the desired structure.

  • Design the side panel based on the dimensions and requirements of the structure it will be attached to.

  • Measure and mark the material accurately before cutting to ensure a precise fit.

  • Cut the material using appropriate tools such as a saw or cutter.

  • Assemble the panel by joining the cut pieces together using screws, nails, or adhesive.

  • Attach the side panel secur...read more

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

Interview Process at Regency group

based on 115 interviews
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.1
 • 398 Interview Questions
4.0
 • 395 Interview Questions
3.3
 • 308 Interview Questions
4.0
 • 240 Interview Questions
4.2
 • 165 Interview Questions
4.1
 • 164 Interview Questions
View all
Top ServiceNow 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

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