i
ServiceNow
Filter interviews by
Clear (1)
Online coding test with 2 coding questions
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 da
Top trending discussions
To merge two double linked lists, traverse to the end of the first list and connect it to the head of the second list.
Traverse to the end of the first list
Connect the last node of the first list to the head of the second list
If the lists are singly linked, we need to traverse to the end of the first list and connect it to the head of the second list. But we also need to keep track of the last node of the first list to ...
A dynamic data structure for storing images as arrays of strings.
Use a 2D array of strings to represent the image pixels.
Implement resizing methods to adjust the size of the image.
Include methods for adding, removing, and modifying pixels.
Consider using compression techniques to reduce memory usage.
Support various image formats such as JPEG, PNG, and BMP.
Copying fixed number of bytes from source to destination and its test cases.
Ensure source and destination are not overlapping
Check if the number of bytes to be copied is greater than the available space in the destination
Handle cases where source or destination is NULL
Test cases should cover all possible scenarios including edge cases
An optimized Fibonacci program computes Fibonacci numbers efficiently.
Use memoization to store previously computed values.
Use iterative approach instead of recursive approach.
Use bitwise operators to perform arithmetic operations faster.
Use matrix exponentiation to compute Fibonacci numbers in logarithmic time.
Virtual functions can cause problems due to their dynamic nature, but can be solved using various techniques.
Use pure virtual functions to ensure all derived classes implement the function
Use interface classes to define a common interface for all derived classes
Use smart pointers to manage memory and avoid memory leaks
Use virtual destructors to ensure proper destruction of objects
Avoid excessive use of virtual function
Find an index in array where sum of elements on left side is equal to sum of elements on right side.
Loop through array and calculate sum of all elements
Then loop through array again and check if sum of elements on left side is equal to sum of elements on right side
Return the index if found, else return -1
Find minimum number of jumps required to reach end of array with max moves in right direction at each index.
Use dynamic programming approach to solve the problem
Maintain an array to store minimum number of jumps required to reach each index
Traverse the array and update the minimum number of jumps for each index
Return the minimum number of jumps required to reach the end of array
Tournament tree is a binary tree where each node represents a match between two players/teams.
Tournament tree is used in sports tournaments to determine the winner.
The leaf nodes represent the players/teams and the internal nodes represent the matches.
The winner of each match is the node with the higher score.
Code can be written using a recursive function to traverse the tree and determine the winner.
Find 2 maximum elements in array in O(n+log(n)) comparison
Use divide and conquer approach
Divide array into two halves
Recursively find max elements in each half
Compare the two max elements to find the overall max elements
Find row with maximum 1s in a sorted 2D array of 0s and 1s.
Use binary search to find the first occurrence of 1 in each row.
Calculate the number of 1s in each row using the index found in step 1.
Keep track of the row with maximum number of 1s.
Time complexity: O(m log n), where m is the number of rows and n is the number of columns.
Efficiently check if a number is present in an array where each element differs by 1.
Use binary search to find the element in the array
Calculate the difference between the middle element and the first element
If the difference is equal to the index of the middle element minus the index of the first element, then the left half of the array is consecutive
If the difference is not equal, then the right half of the array is ...
Microsoft Excel
Add more chart types (p1)
Improve collaboration features (p2)
Enhance data analysis tools (p3)
Integrate with more external data sources (p4)
Improve error handling and debugging (p5)
Program to rearrange shuffled 16 squares to get original big square
Create a 4x4 matrix to represent the big square and fill it with shuffled squares
Loop through the matrix and check if each square is in the correct position
If a square is not in the correct position, swap it with the square in the correct position
Repeat until all squares are in the correct position
The first declaration casts i to int pointer and dereferences it, while the second declaration casts the address of i to int pointer and dereferences it.
The first declaration assumes i is already an int pointer.
The second declaration takes the address of i and casts it to an int pointer.
The first declaration may cause a segmentation fault if i is not an int pointer.
The second declaration may cause unexpected behavior i...
Minimum comparisons needed to find median in unsorted array of size n
For odd n, median is the middle element. For even n, median is the average of middle two elements
Minimum comparisons needed for odd n is (n-1)/2. For even n, it is n/2
Various sorting algorithms can be used to find median in an unsorted array
Time complexity to find an element in an alternatively sorted array.
The time complexity will be O(log n) using binary search.
Check the middle element and compare with the target element.
If the middle element is greater than the target, search in the left half of the array.
If the middle element is smaller than the target, search in the right half of the array.
Repeat until the target element is found or the array is exha
DSA,COMPUTER FUNDAMENTALS
Tree traversals are methods used to visit each node in a tree data structure in a specific order.
Inorder traversal: Visit left subtree, then root, then right subtree
Preorder traversal: Visit root, then left subtree, then right subtree
Postorder traversal: Visit left subtree, then right subtree, then root
Basic dp and graph questions
Calculate the sum of all left leaf nodes in a binary tree.
Traverse the binary tree using depth-first search (DFS)
Check if a node is a leaf node and if it is a left child
Add the value of the left leaf node to the sum
Recursively traverse the left and right subtrees
I applied via Referral and was interviewed in Feb 2024. There were 2 interview rounds.
Quantitative and Verbal
2 Questions - DSA (Array and Numbers)
Traverse a binary tree in different orders (inorder, preorder, postorder)
Inorder traversal: Left, Root, Right
Preorder traversal: Root, Left, Right
Postorder traversal: Left, Right, Root
BitTorrent is a peer-to-peer file sharing protocol that allows users to distribute large amounts of data over the internet.
BitTorrent breaks down files into small pieces and distributes them among multiple users.
Users download and upload pieces of the file simultaneously, increasing download speeds.
Users connect to a tracker to find other users sharing the same file.
Popular BitTorrent clients include uTorrent, BitTorre
based on 1 interview
Interview experience
Software Engineer
414
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
345
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Support Engineer
121
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Data Analyst
90
salaries
| ₹0 L/yr - ₹0 L/yr |
Staff Software Engineer
76
salaries
| ₹0 L/yr - ₹0 L/yr |
Salesforce
Oracle
SAP
Microsoft Corporation