0% found this document useful (0 votes)
27 views1 page

Cisco Interview Coding Challenges Summary

The document discusses two interview questions asked of a Cisco candidate with 8+ years of experience. For the first question on moving zeros to the right in an array, the candidate proposed two approaches - swapping non-zero elements to the left and tracking zero counts - but struggled to code the solutions. For the second question on finding the starting node of common elements in two linked lists, the candidate was able to devise an approach but could not code it with all edge cases.

Uploaded by

MB Astro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Cisco Interview Coding Challenges Summary

The document discusses two interview questions asked of a Cisco candidate with 8+ years of experience. For the first question on moving zeros to the right in an array, the candidate proposed two approaches - swapping non-zero elements to the left and tracking zero counts - but struggled to code the solutions. For the second question on finding the starting node of common elements in two linked lists, the candidate was able to devise an approach but could not code it with all edge cases.

Uploaded by

MB Astro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cisco - 8+years of exp

Ques: Given an array of n whole numbers, move zeros to right

Approach 1: swap non zero entries with elements at last


Added constraint not to change array ordering
Approach 2: keep two pointers, take a count of zero elements, swap non zero
entries in increasing order of index and fill zeroes at last
Asked about time complexity - came up with O(n)

Struggles with converting thoughts to code

Ques 2: Two linked list with common elements at the end. Tell me the common
starting node.

Able to come up with approach

– Misses edge cases while converting solution to code


– Can't complete a function with all cases

You might also like