Juniper Networks interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Juniper Networks
upvote
share-icon
1 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, OS, Networking, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Face to Face
Duration40 minutes
Interview date12 Dec 2016
Coding problem3

Technical round with questions based on DSA.

1. Reverse a number

Easy
0/40
Asked in companies
SAP LabsZetaDeloitte

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., reverse of 10400 will be 401 instead of 00401.


Problem approach

To reverse a number following steps should be performed:
Take the number’s modulo by 10
Multiply the reverse number by 10 and add modulo value into the reverse number.
Divide the number by 10.
Repeat above steps until number becomes zero.

Pseudocode :
reverse(n){

rev = 0; // reversed number
rem; // initialise a variable to store remainder

while(n>0){
rem = n%10;
rev = (rev*10) + rem;
n = n/10;
}
return rev;
}

Try solving now

2. Reverse a linked list

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrHSBCLenskart
Note :
You do not need to print anything, just return the head of the reversed linked list. 
Problem approach

This can be solved both: recursively and iteratively.
The recursive approach is more intuitive. First reverse all the nodes after head. Then we need to set head to be the final node in the reversed list. We simply set its next node in the original list (head -> next) to point to it and sets its next to NULL. The recursive approach has a O(N) time complexity and auxiliary space complexity.
For solving the question is constant auxiliary space, iterative approach can be used. We maintain 3 pointers, current, next and previous, abbreviated as cur, n and prev respectively. All the events occur in a chain.
1. Assign prev=NULL, cur=head .
2. Next, repeat the below steps until no node is left to reverse:
1. Initialize n to be the node after cur. i.e. (n=cur->next)
2. Then make cur->next point to prev (next node pointer).
3. Then make prev now point to the cur node.
4. At last move cur also one node ahead to n.
The prev pointer will be the last non null node and hence the answer.

Try solving now

3. Conceptual Question

What's the difference in C++ between "new int[5]" and "malloc(5 * sizeof(int))"?

Problem approach

First, new int[5] must be freed using delete[], and malloc(...) must be freed using free. You cannot mix and match.
Second, if you use a type with a constructor then malloc will not call the constructor, and free will not call the destructor. You have to call them manually (or just use new/free).

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Software Engineer Intern
4 rounds | 7 problems
Interviewed by Juniper Networks
2519 views
0 comments
0 upvotes
Staff Engineer
2 rounds | 5 problems
Interviewed by Juniper Networks
1605 views
0 comments
0 upvotes
SDE - 1
6 rounds | 7 problems
Interviewed by Juniper Networks
1761 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3210 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2583 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes