Juniper Networks
60+ Interview Questions and Answers
Write a program to generate the reverse of a given number N. Print the corresponding reverse number.
Note : If a number has trailing zeros, then its reverse will not include them. For e.g., reve...read more
You are given an integer 'N'. Your task is to find the number formed after swapping each even bit of 'N' in its binary representation with its adjacent bit on the right, assuming that the...read more
You are given a Singly Linked List of integers. You need to reverse the Linked List by changing the links between nodes.
Input Format :
The first line of input contains a single integer T, ...read more
You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.
For example:
For the given binary tree
The level orde...read more
What's the difference in C++ between "new int[5]" and "malloc(5 * sizeof(int))"?
Q6. What is the difference between into arr [5] and malloc (5*sizeof (int))
The difference is that 'int arr[5]' creates an array on the stack, while 'malloc(5*sizeof(int))' allocates memory on the heap.
int arr[5] creates an array of 5 integers on the stack, which is a fixed-size memory allocation.
malloc(5*sizeof(int)) dynamically allocates memory on the heap, allowing for variable-size memory allocation.
The memory allocated with malloc must be explicitly freed with free() to avoid memory leaks.
Q7. Explain me about all the data structures you know, tell me their advantages over others and applications
Data structures are fundamental concepts in software engineering that organize and store data efficiently.
Arrays: Simple and efficient for storing and accessing elements.
Linked Lists: Dynamic and flexible, efficient for insertion and deletion.
Stacks: LIFO structure, useful for managing function calls and undo operations.
Queues: FIFO structure, ideal for managing tasks and scheduling.
Trees: Hierarchical structure, used for organizing data like file systems or search algorithms...read more
Q8. how do you swap two particular bits of an integer program?
Swapping two particular bits of an integer program.
Use bitwise operators to get the values of the two bits to be swapped
Use XOR operator to swap the bits
Shift the bits back to their original positions
Example: Swapping 2nd and 5th bits of 8 (1000) gives 32 (100000)
Example code: num ^= (1 << bit1) | (1 << bit2);
Q9. Reverse a linked list without using extra memory
Reverse a linked list without using extra memory
Iterate through the linked list and change the next pointers to reverse the list
Use three pointers - prev, current, and next - to keep track of the reversed list
Start with prev and current pointing to null and the head of the linked list respectively
While traversing the list, update the next pointer of the current node to point to the previous node
Move prev and current pointers one step forward
Repeat until the end of the list is...read more
Q10. give the elements of an array that sum up to given number.
Find elements in array that sum up to given number
Use a nested loop to iterate through each pair of elements in the array
Check if the sum of the pair equals the given number
Return the pair of elements if found, otherwise continue iterating
Q11. Write a program to reverse a n integer
Program to reverse an integer
Convert the integer to a string
Reverse the string
Convert the reversed string back to an integer
Q12. Automation framework you worked on. How that help overall business unit.
The automation framework I worked on improved efficiency and productivity in the business unit.
The automation framework reduced manual effort by automating repetitive tasks.
It improved the accuracy and reliability of the software development process.
The framework enabled faster testing and deployment of software updates.
It facilitated better collaboration and communication among team members.
The automation framework helped in identifying and fixing bugs or issues more efficie...read more
Various components of IP Packet Header
Various components of TCP Segment Header
Q15. IP packet header and meaning of each field and usage of each field
IP packet header fields and their usage
Version: indicates the IP version being used (IPv4 or IPv6)
Header Length: specifies the length of the IP header
Type of Service: used to prioritize packets
Total Length: specifies the total length of the IP packet
Identification: used to identify fragments of a larger packet
Flags: used to control fragmentation
Fragment Offset: used to reassemble fragmented packets
Time to Live: specifies the maximum number of hops a packet can take
Protocol: s...read more
Difference between TCP and UDP
Q17. TCP packet header and meaning of each field and usage of each field
TCP packet header fields and their usage
TCP packet header consists of 20 bytes
Fields include source and destination ports, sequence and acknowledgement numbers, flags, window size, and checksum
Source and destination ports identify the endpoints of the connection
Sequence and acknowledgement numbers are used for reliable data transfer
Flags indicate the purpose of the packet, such as SYN, ACK, FIN, RST
Window size is used for flow control
Checksum is used for error detection
Q18. Explain which are IPC mechanism
IPC mechanisms are used for inter-process communication in software development.
IPC mechanisms allow processes to communicate with each other, either on the same machine or across a network.
Common IPC mechanisms include pipes, message queues, shared memory, sockets, and signals.
Examples of IPC mechanisms include using sockets for network communication between client and server applications, or using shared memory for communication between processes on the same machine.
Q19. why security is important in a system?
Security is important in a system to protect against unauthorized access, data breaches, and cyber attacks.
Prevents unauthorized access to sensitive data
Protects against data breaches and cyber attacks
Ensures confidentiality, integrity, and availability of data
Compliance with regulations and standards
Maintains trust and confidence of customers and stakeholders
Q20. How tcp/ip works and explain about tcp header
TCP/IP is a protocol used for communication between devices on a network. TCP header contains information about the data being transmitted.
TCP/IP is a suite of protocols used for communication between devices on a network
TCP is a connection-oriented protocol that ensures reliable delivery of data
IP is a connectionless protocol that handles the routing of data packets
TCP header contains information such as source and destination ports, sequence and acknowledgement numbers, and...read more
Q21. How vlan works and explain about vlan header
VLAN is a logical network created by grouping devices together based on their functions or departments.
VLAN stands for Virtual Local Area Network
It allows multiple networks to coexist on the same physical network
VLANs are created by assigning a group of devices to a specific VLAN ID
VLAN header contains a 4-byte tag that identifies the VLAN ID
VLAN header is added to the Ethernet frame before transmission
Q22. Explain the Socket communication
Socket communication is a method of communication between two processes on a network using sockets.
Socket communication involves a client and a server communicating over a network.
It uses TCP or UDP protocols to establish a connection.
Data is exchanged through sockets using read and write operations.
Sockets can be used for various applications like web browsing, email, and file transfer.
Q23. I2c Spi protocol implementation
I2C and SPI are serial communication protocols used for connecting microcontrollers to peripherals.
I2C (Inter-Integrated Circuit) is a synchronous, multi-master, multi-slave, packet-switched protocol commonly used for communication between integrated circuits.
SPI (Serial Peripheral Interface) is a synchronous, full-duplex, master-slave communication protocol commonly used for communication between microcontrollers and peripheral devices.
I2C uses two wires (SDA and SCL) for co...read more
Q24. What is method overloading and method overriding
Method overloading is creating multiple methods with the same name but different parameters. Method overriding is creating a new implementation of an existing method in a subclass.
Method overloading is used to provide different ways of calling the same method with different parameters.
Method overriding is used to change the behavior of an existing method in a subclass.
Method overloading is resolved at compile-time based on the number and type of arguments passed to the method...read more
Q25. What are issues caused due to asymmetric routing in a network.
Asymmetric routing in a network can lead to issues such as packet loss, out-of-order delivery, and inefficient use of network resources.
Packet loss: When packets take different paths to reach their destination, some packets may get lost or dropped along the way.
Out-of-order delivery: Asymmetric routing can cause packets to arrive at the destination out of order, leading to delays in data transmission.
Inefficient use of network resources: Asymmetric routing can result in subop...read more
Q26. DSA - One problem on shopping cart
Implement a shopping cart system using data structures and algorithms.
Use a data structure like a hash map to store items and their quantities in the cart.
Implement functions to add, remove, and update items in the cart.
Consider implementing functions to calculate total price, apply discounts, and handle checkout process.
Q27. Blackhole issues with firewalls in the middle and slowness issues forward traffic via mpls and return traffic via internet.
Blackhole issues with firewalls can cause slowness in forwarding traffic via MPLS and returning traffic via internet.
Check firewall configurations to ensure proper routing of traffic
Investigate blackhole issues to identify any dropped packets
Consider implementing Quality of Service (QoS) policies to prioritize MPLS traffic
Monitor network performance to detect any bottlenecks causing slowness
Q28. Telephone directory implementation program
Implement a telephone directory program using an array of strings.
Create an array of strings to store the directory
Implement functions to add, delete, and search for entries
Consider using a hash table for faster search times
Include error handling for invalid input
Q29. level printing of a tree program
Printing a tree in level order
Use a queue to store nodes in level order
Enqueue root node and print its value
Dequeue the node and enqueue its children
Repeat until queue is empty
Q30. Asymmetric routing and issues due to asymmetric routing
Asymmetric routing occurs when data packets take different paths to reach their destination, leading to potential issues such as packet loss or out-of-order delivery.
Asymmetric routing can occur in networks with multiple paths between source and destination.
Issues with asymmetric routing include packet loss, out-of-order delivery, and potential security vulnerabilities.
Examples of solutions to mitigate asymmetric routing issues include implementing symmetric routing policies ...read more
Q31. Binary search using recursion.
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 equal to the middle element, return the index.
If the target value is less than the middle element, recursively search the left half.
If the target value is greater than the middle element, recursively search the right half.
Q32. Create your own hashmap
Implement a custom hashmap in Java
Create a class to represent the hashmap
Use an array to store the key-value pairs
Implement methods for put, get, and remove operations
Q33. Subarray Sum divisible by K
Find the number of subarrays whose sum is divisible by K.
Use prefix sum technique to calculate the sum of subarrays efficiently.
Keep track of the remainders of prefix sums when divided by K.
Use a hashmap to store the count of each remainder.
For each prefix sum, check how many previous prefix sums have the same remainder.
Add the count of subarrays with the same remainder to the total count.
Q34. Can we overload the constructer
Yes, we can overload the constructor in Java.
Overloading constructor means creating multiple constructors with different parameters.
The constructors can have different number of parameters or different types of parameters.
The constructor with the matching parameters will be called during object creation.
Q35. Code to be written on notepad not on IDE
Writing code on notepad instead of an IDE
Ensure proper indentation and formatting
Use comments to explain code
Compile and test code manually
Save frequently to avoid losing work
Q36. The program which checks String Reverse
The program checks if a given string is a palindrome or not.
Create a function that takes a string as input
Reverse the string and compare it with the original string
Return true if they are the same, false otherwise
Q37. How does python handle multiple object types ??
Python uses dynamic typing to handle multiple object types, allowing variables to change types during runtime.
Python uses dynamic typing, meaning variables can hold different types of objects at different times.
Python does not require explicit declaration of variable types, allowing for flexibility in handling multiple object types.
Python supports polymorphism, allowing objects of different types to be treated as instances of a common superclass.
Python uses duck typing, focus...read more
Q38. What happens when I cast a python variable ??
When you cast a Python variable, you are converting its data type to a different type.
Casting is the process of changing a variable's data type.
For example, casting a string to an integer: x = '10' -> int(x) = 10
Casting can result in data loss if the conversion is not possible or accurate.
Q39. Dictionary implementation program
A program to implement a dictionary using an array of strings.
Use an array of strings to store the words and their definitions.
Implement functions to add, delete, and search for words.
Consider using a hash table for faster search times.
Q40. Convert the linked list 1,2,3,4,5,6,Null into 1,6,2,5,3,4,Null
Reorder a linked list by alternating between the first and last elements
Create two pointers, one at the beginning and one at the end of the linked list
Iterate through the linked list, moving the first pointer to the next node and the second pointer to the previous node
Adjust the pointers to reorder the linked list by alternating between the first and last elements
Q41. Arrays from neetcode
Arrays are a collection of strings in programming used to store multiple values under a single variable name.
Arrays are declared using square brackets []
Each element in an array is accessed by its index, starting from 0
Example: var fruits = ['apple', 'banana', 'orange']
Q42. Trees in neet code
Trees in neet code refer to the implementation of tree data structures in coding challenges on the platform NeetCode.
Trees are a common data structure used in coding challenges to represent hierarchical relationships between data.
Common tree operations include traversal (inorder, preorder, postorder), insertion, deletion, and searching.
Examples of tree-related coding challenges on NeetCode include implementing a binary search tree, finding the lowest common ancestor of two no...read more
Q43. Trees in leet code
Trees in leetcode are a common topic for coding interviews, involving various tree traversal and manipulation techniques.
Understand different tree traversal methods like inorder, preorder, and postorder.
Learn about common tree algorithms like finding the height, diameter, and lowest common ancestor.
Practice solving tree-related problems on leetcode to improve your skills.
Q44. Difference between Process and Threads
Processes are independent instances of a program, while threads are smaller units within a process sharing resources.
Processes have their own memory space, while threads share the same memory space within a process.
Processes are heavyweight, while threads are lightweight.
Processes communicate with each other through inter-process communication mechanisms, while threads can communicate directly.
Example: A web browser running multiple tabs is a process, and each tab running Jav...read more
Q45. Programing in C on linked list
Programming in C on linked list
Understand the concept of linked list and its implementation in C
Allocate memory dynamically using malloc()
Use pointers to traverse and manipulate the linked list
Handle edge cases such as empty list and deleting nodes
Avoid memory leaks by freeing allocated memory
Q46. In-dept BGP protocol.
BGP (Border Gateway Protocol) is a routing protocol used to exchange routing information between autonomous systems on the internet.
BGP is an exterior gateway protocol (EGP) that operates on TCP port 179.
It is used to establish and maintain routing information among routers in different autonomous systems (ASes).
BGP uses a path-vector algorithm to determine the best path for routing traffic.
It supports both IPv4 and IPv6 networks.
BGP allows routers to exchange information abo...read more
Q47. Implement merge sort in linked list
Merge sort implemented in a linked list
Divide the linked list into two halves using slow and fast pointers
Recursively sort each half
Merge the sorted halves back together
Q48. Finding patterns in a stream of numbers
Finding patterns in a stream of numbers involves analyzing the sequence for recurring trends or relationships.
Look for repeating sequences or intervals in the numbers.
Check for arithmetic progressions or geometric progressions.
Consider using algorithms like sliding window or dynamic programming for efficient pattern detection.
Q49. What is polymorphism
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It is achieved through method overriding and method overloading.
Example: A parent class Animal can have child classes like Dog, Cat, and Bird. All these child classes can have their own implementation of the method 'makeSound', but they can be treated as Animals.
Polymorphism helps in achieving code reusability and flexi...read more
Q50. What is data type
Data type is a classification of data based on the type of value it holds.
Data type determines the type of operations that can be performed on the data.
Examples of data types include integer, float, boolean, and string.
Data types can be primitive or non-primitive.
Primitive data types are predefined by the language and non-primitive data types are created by the programmer.
Q51. Next level account concepts in detail
Next level account concepts involve advanced financial analysis, forecasting, budgeting, and strategic planning.
Advanced financial analysis includes ratio analysis, trend analysis, and variance analysis.
Forecasting involves predicting future financial performance based on historical data and market trends.
Budgeting requires creating detailed financial plans for revenue and expenses.
Strategic planning involves aligning financial goals with overall business objectives.
Examples:...read more
Q52. finding an equilibrium point in an array
Finding an equilibrium point in an array
An equilibrium point is a position in an array where the sum of elements on the left is equal to the sum of elements on the right
Iterate through the array and calculate the sum of elements on the left and right of each position
If the sums are equal, return the position as the equilibrium point
If no equilibrium point is found, return -1
Q53. Check if a binary tree is BST?
Check if a binary tree is a Binary Search Tree (BST) by validating the inorder traversal.
Perform an inorder traversal of the binary tree and store the elements in a list.
Check if the list is sorted in ascending order. If yes, then the binary tree is a BST.
Ensure that there are no duplicate elements in the binary tree.
Q54. Explain DNS protocol
DNS protocol is used to translate domain names to IP addresses on the internet.
DNS stands for Domain Name System
It translates human-readable domain names (like www.google.com) to IP addresses (like 172.217.3.206)
DNS operates on a client-server model, with DNS servers hosting DNS records for different domains
DNS queries are sent by clients to DNS servers to resolve domain names to IP addresses
Q55. tcp Vs udp
TCP is a reliable, connection-oriented protocol while UDP is a faster, unreliable, connectionless protocol.
TCP ensures data delivery and error checking while UDP does not.
TCP establishes a connection before data transfer while UDP does not.
TCP is used for applications that require reliable data transfer like email, file transfer, etc. while UDP is used for applications that require speed like online gaming, video streaming, etc.
Q56. Memory layout in C
Memory layout in C refers to how variables are stored in memory.
Variables are allocated memory based on their data type
Memory is divided into stack and heap
Pointers store memory addresses
Structs store data in contiguous memory locations
Q57. string reverse without using loop
Reverse a string without using a loop.
Use the built-in string manipulation functions in your programming language.
Convert the string to an array of characters, reverse the array, and then convert it back to a string.
Use recursion to reverse the string by swapping the first and last characters.
Q58. evpn vxlan topology explanation
EVPN VXLAN topology explanation
EVPN (Ethernet VPN) is a technology used to extend Layer 2 connectivity across a Layer 3 network
VXLAN (Virtual Extensible LAN) is a tunneling protocol used to overlay virtualized Layer 2 networks over Layer 3 networks
EVPN VXLAN topology combines the benefits of both technologies to provide scalable and flexible network virtualization
It allows for efficient communication between virtual machines across different physical hosts or data centers
Q59. System design around scalable design
Scalable system design involves creating a system that can handle increased load and growth over time.
Use microservices architecture to break down the system into smaller, independent services
Implement load balancing to distribute traffic evenly across servers
Utilize caching mechanisms to reduce the load on the database
Design for horizontal scalability by adding more servers to handle increased load
Consider using cloud services for scalability and flexibility
Q60. reverse a linked list
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 accordingly
Set the next pointer of the current node to the previous node
Q61. Bfs tree traversal
BFS tree traversal visits nodes level by level starting from the root.
Start at the root node and visit its children before moving on to the next level.
Use a queue data structure to keep track of nodes to visit next.
BFS is often used to find the shortest path in unweighted graphs.
More about working at Juniper Networks
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month