Walmart Labs
30+ Security Services Interview Questions and Answers
Q1. how to find number of paths in tree such that sum of the values in those nodes will be equal to count?(hint:recursion)
Finding number of paths in tree with sum of node values equal to count using recursion.
Use recursion to traverse the tree and keep track of the sum of node values.
At each node, check if the current sum equals the desired count.
If yes, increment the path count.
Recursively traverse the left and right subtrees.
Return the total path count.
Example: Given a tree with values [10, 5, -3, 3, 2, null, 11], count the number of paths with sum equal to 8.
The answer would be 3, as there ar...read more
Q2. There is 3*3 RUBIX cube, Can you find data structure for solving rubix cube
A graph data structure can be used to solve a Rubix cube.
Each cubelet can be represented as a node in the graph.
Edges can be added between nodes to represent possible moves.
A search algorithm like BFS or DFS can be used to find the solution.
Q3. If Redo and Undo operations have to perform, which datastructure can we use?(stack)
Stack data structure is suitable for implementing Redo and Undo operations.
Stack follows Last-In-First-Out (LIFO) order, which is ideal for undoing and redoing operations.
When an operation is performed, it can be pushed onto the stack for undoing later.
To redo an operation, the previously undone operations can be popped from the stack.
Stack provides efficient insertion and deletion at one end, making it suitable for undo and redo functionality.
Q4. Given array of weights(infinite supply), can you find that given weight can be formed by using those set of weights?(dynamic programming,geeksforgeeks)
Dynamic programming solution to find if a given weight can be formed using an array of weights
Create a boolean array of size (given weight + 1) to store if a weight can be formed or not
Initialize the first element of the boolean array to true
Iterate through the array of weights and for each weight, iterate through the boolean array and mark true for all weights that can be formed using the current weight
Return the value at the index of the given weight in the boolean array
Q5. Can you explain me about Router ?
A router is a networking device that forwards data packets between computer networks.
Routers operate at the network layer of the OSI model.
They use routing tables to determine the best path for data packets to travel.
Routers can connect multiple networks together, such as a home network to the internet.
They can also provide security by blocking unauthorized access to a network.
Examples of routers include Cisco, Netgear, and TP-Link.
Q6. one simple puzzle?(cant explain through words)
Arrange 8 queens on a chessboard so that no two queens threaten each other.
Each queen must be placed in a different row and column
No two queens can be in the same diagonal
There are 92 possible solutions
One solution is: (0, 4), (1, 2), (2, 7), (3, 3), (4, 6), (5, 1), (6, 5), (7, 0)
Q7. Explain about how internet works?
The internet is a global network of interconnected devices that communicate with each other using standardized protocols.
The internet is made up of millions of interconnected devices such as computers, servers, routers, and switches.
Data is transmitted across the internet using standardized protocols such as TCP/IP.
The internet is accessed through Internet Service Providers (ISPs) who provide users with a connection to the internet.
Websites are hosted on servers and accessed ...read more
Q8. Find the subarray with given sum.
Find subarray with given sum in an array of integers.
Use a sliding window approach to find subarray with sum equal to given sum.
Keep track of current sum and adjust window size accordingly.
Return the indices of the subarray if found, else return an empty array.
Q9. What are the settings to enable automation in SAP logon pad?
To enable automation in SAP logon pad, settings need to be configured in SAP GUI Options.
Open SAP GUI Options
Navigate to Accessibility & Scripting
Check 'Enable Scripting' and 'Enable GUI Scripting'
Save the changes and restart SAP Logon Pad
Use SAP Script Recording and Playback to automate tasks
Q10. Reverse a linkedlist, sorting algorithms
Reverse a linked list and discuss sorting algorithms.
To reverse a linked list, you can use a three-pointer approach.
Sorting algorithms include bubble sort, insertion sort, merge sort, quicksort, etc.
Discuss the time complexity and space complexity of each sorting algorithm.
Provide examples of how each sorting algorithm works.
Q11. What is master data in SAP? Explain T-Codes for accessing master data in SAP.
Master data in SAP refers to the core data that is used as a base for transactional data.
Master data includes information about customers, vendors, materials, and accounts.
T-Codes for accessing master data include MM01 for creating materials, XD01 for creating customers, and FK01 for creating vendors.
Other T-Codes for accessing master data include XK01 for creating vendors centrally, ME11 for creating purchasing info records, and FS00 for creating G/L accounts.
Q12. 1. What is the automation framework you have used?
I have used the Selenium WebDriver framework for automation.
Selenium WebDriver is a popular automation framework used for web application testing.
It provides a set of APIs to interact with web elements and perform actions like clicking, typing, etc.
It supports multiple programming languages such as Java, C#, Python, etc.
Selenium WebDriver can be integrated with various testing frameworks like TestNG or JUnit for test management and reporting.
It allows cross-browser testing by...read more
Q13. What are the key components of frontend system design?
Key components of frontend system design include user interface, data management, state management, and performance optimization.
User Interface: Designing the layout, navigation, and visual elements of the frontend.
Data Management: Handling data fetching, storage, and manipulation within the frontend.
State Management: Managing the state of the application to ensure data consistency and reactivity.
Performance Optimization: Optimizing the frontend code and assets for faster loa...read more
Q14. Use two thread two print From 1 to 10 where Thread A will be for odd and Thread B will be for even.
Use two threads to print numbers 1 to 10, with Thread A printing odd numbers and Thread B printing even numbers.
Create two threads, one for odd numbers and one for even numbers
Use a shared variable to keep track of the current number being printed
Use synchronization mechanisms like mutex or semaphore to ensure proper sequencing of numbers
Q15. How did you automate IDoc process in SAP?
I automated IDoc process in SAP using SAP PI/PO and custom Java code.
Used SAP PI/PO to create a communication channel between SAP and non-SAP systems
Developed custom Java code to handle IDoc processing and mapping
Configured IDoc adapter in SAP PI/PO to receive and send IDocs
Used SAP PI/PO monitoring tools to track IDoc processing status
Q16. What are the basics of JavaScript and ES6 modules?
JavaScript is a popular programming language used for web development. ES6 modules are a way to organize and reuse code in JavaScript.
JavaScript is a high-level, interpreted programming language commonly used for client-side web development.
ES6 modules allow developers to split their code into separate files and import/export functions, variables, and classes between them.
ES6 introduced 'import' and 'export' keywords for module management.
Example: 'export function myFunction(...read more
Q17. Explain SAP SD to SAP FI integration.
SAP SD and SAP FI integration enables seamless flow of data between sales and financial processes.
SAP SD generates sales orders and invoices which are posted in SAP FI
SAP FI manages financial transactions and accounting entries
Integration ensures accurate and timely financial reporting
Data flows from SD to FI through various interfaces and tables
Q18. Write a code for building a heap and explain its time complexity
A code for building a heap and its time complexity
A heap is a complete binary tree where each node is greater than or equal to its children
To build a heap, start from the last non-leaf node and heapify down each node
Time complexity: O(n) for building a heap of n elements
Q19. Intersection and Intersection Point in 2 Linked List
The question is about finding the intersection point of two linked lists.
Traverse both linked lists and find their lengths
Move the pointer of the longer list ahead by the difference in lengths
Now, traverse both lists simultaneously until the pointers meet, which will be the intersection point
Q20. design for a date picker in javascript
A date picker in JavaScript allows users to select a date from a calendar interface.
Use HTML input element with type 'date' for modern browsers
For older browsers, use a JavaScript library like jQuery UI Datepicker
Implement validation to ensure selected date is within acceptable range
Q21. sort 0 1 2 array binary tree left view
Sort an array of 0s, 1s, and 2s and find the left view of a binary tree.
To sort the array of 0s, 1s, and 2s, you can use the Dutch National Flag algorithm which sorts the array in a single pass.
To find the left view of a binary tree, perform a level order traversal and keep track of the first node at each level.
Q22. Internal implementation of HashMap
HashMap is implemented using an array of linked lists to store key-value pairs.
HashMap consists of an array of buckets, each containing a linked list of key-value pairs.
Hashing function is used to determine the index of the bucket where a key-value pair will be stored.
Collision resolution techniques like chaining or open addressing are used to handle collisions.
HashMap allows null keys and values, but only one null key.
Example: HashMap
map = new HashMap<>();
Q23. Why JVM is platform independent
JVM is platform independent because it uses bytecode and provides a runtime environment for executing Java programs.
JVM stands for Java Virtual Machine.
It executes Java bytecode, which is a platform-independent intermediate representation of the Java program.
JVM provides a runtime environment that abstracts the underlying hardware and operating system.
The bytecode is compiled once and can run on any system with a compatible JVM.
This allows Java programs to be written once and...read more
Q24. How we document the processes in current project.
Q25. Why does zookeeper have odd number of nodes
Zookeeper uses odd number of nodes to ensure a majority quorum for leader election and data consistency.
Odd number of nodes helps in avoiding split-brain scenarios where multiple nodes claim to be the leader
With an odd number of nodes, a majority quorum can be established to elect a leader and maintain data consistency
In case of network partitions, having an odd number of nodes ensures that there is always a majority to make decisions
Q26. How would you plan for a ERP migration?
Planning for an ERP migration involves thorough assessment, stakeholder engagement, detailed project plan, testing, and training.
Conduct a thorough assessment of current ERP system, data, processes, and requirements for the new system.
Engage stakeholders from various departments to gather input, address concerns, and ensure buy-in.
Develop a detailed project plan outlining tasks, timelines, resources, and dependencies.
Perform extensive testing of the new ERP system to identify...read more
Q27. Implement Stack using Queue.
Implement a stack using a queue data structure.
Use two queues to simulate a stack.
Push operation: Enqueue the element to queue 1.
Pop operation: Dequeue all elements from queue 1 to queue 2, dequeue the last element from queue 2.
Top operation: Return the front element of queue 1.
Empty operation: Check if both queues are empty.
Q28. Write java code for given problem
Java code to find the longest common prefix among an array of strings
Create a function that takes in an array of strings as input
Initialize a variable to store the longest common prefix
Iterate through the characters of the first string and compare with the corresponding characters of other strings
Return the longest common prefix
Q29. Difference between Java and C++
Java and C++ are both object-oriented programming languages, but they have differences in syntax, memory management, and platform compatibility.
Java is platform-independent, while C++ is platform-dependent.
Java uses automatic memory management (garbage collection), while C++ requires manual memory management.
Java has a simpler syntax and is easier to learn, while C++ has a more complex syntax and is considered more difficult to master.
Java has built-in support for multithread...read more
Q30. Send 0s to the back of the array.
Move all 0s to the end of the array while maintaining the order of other elements.
Iterate through the array and keep track of the index to place non-zero elements.
After iterating, fill the remaining positions with 0s.
Q31. k largest elements in an array
Find the k largest elements in an array.
Sort the array in descending order.
Return the first k elements of the sorted array.
If k is larger than the array size, return the entire array.
Q32. Spark Optimization on JOIN queries
Optimizing JOIN queries in Spark involves partitioning data, using broadcast joins, and optimizing shuffle operations.
Partition data to avoid shuffling unnecessary data across the network
Use broadcast joins for small tables that can fit in memory of each executor
Optimize shuffle operations by tuning shuffle partitions and memory settings
Q33. explaing how do you manage releases
Managing releases involves planning, coordinating, and executing the deployment of software updates.
Create a release plan that outlines the scope, timeline, and resources required for each release.
Coordinate with cross-functional teams such as development, QA, operations, and stakeholders.
Use project management tools to track progress, identify dependencies, and manage risks.
Perform thorough testing and quality assurance to ensure the release meets the required standards.
Comm...read more
Q34. Python program to parse JSON
Python program to parse JSON
Use the json module in Python to parse JSON data
Use the loads() method to load JSON data into a Python dictionary
Access the data in the dictionary using keys
Q35. Survey analysis tool
A survey analysis tool helps in analyzing and visualizing survey data to draw insights.
Use data visualization techniques like bar charts, pie charts, and histograms to represent survey results.
Utilize statistical analysis methods to identify trends and patterns in the data.
Implement machine learning algorithms for predictive analysis based on survey responses.
Allow for filtering and segmentation of survey data based on different criteria.
Include features for sentiment analysi...read more
Top HR Questions asked in Security Services
Interview Process at Security Services
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month