Cisco Systems Interview Questions
- 1of 1 vote
AnswersFor the given array count the partitions such that absolute deferrence between any two elements from partition is less then or equal to k order of elements in partition array is is independent and elements is not get repeated in portion.
- Rising star January 23, 2022 in India
Quetion: A[] = { 1, 2,3,10, 5,4}, K = 3.
There are two Possible partitions are {1,2,3}, {5, 4} or {1,2}, {3, 5, 4} or {2,3,5,}, {1,4} there are two partion such that absolute deferrence between any two elements is less then K
So the Output is 2| Report Duplicate | Flag | PURGE
Cisco Systems Backend Developer Algorithm Arrays C++ Data Structures - 2of 2 votes
AnswersPrint Common Suffix In Strings
- praveenz.poola September 15, 2017 in India
Ex: cornfiled , Exfiled --- field| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer Java - 1of 1 vote
AnswerExplain the Data Structure which is well suited to implement UNIX commands like PWD, LS, MKDIR, CD in an imaginary OS. No code required.
- neer.1304 September 04, 2017 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Developer Data Structures - 0of 0 votes
AnswersUnsorted array and a position ‘P’. Return the element that is likely to come to the given location upon sorting the array. TC in O(n).
- neer.1304 September 04, 2017 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Developer Algorithm - 0of 0 votes
AnswerA thief trying to escape from a jail has to cross ‘N’ walls each with varying heights. He climbs ‘X’ feet every time. But, due to the slippery nature of those walls, every times he slips back by ‘Y’ feet. Now the input is given as (N, {H1, H2, H3,….Hn}, X, Y}. Calculate the total number of jumps required to cross all walls and escape from the jail.
- neer.1304 September 04, 2017 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Developer Algorithm - 0of 0 votes
Answersis there a way to make the bean not initialize when spring application context coming up
- shin.subash March 03, 2016 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Dev Lead - -2of 2 votes
AnswersCadbury bar size of 5*3 can be distributed to 4 children.
- Deep November 04, 2015 in India
5*4 can be distributed to 5 children.
6*3 can be distributed to 2 children.
6*4 can be distributed to 3 children. so the whole carton can be distributed among 14 children
Program output shall be 14.
Input/Output Specification: M,N,P,Q are the integer type (M,N values are the ranges for the length of cadburybar P,Q values are the ranges for breadth of Cadbury bar)
Output: Number of children who will receive cadbury bar from the carton.| Report Duplicate | Flag | PURGE
Cisco Systems SDE-2 Algorithm - 0of 2 votes
AnswersYou have given an array and you want to find an integer k so that the sum of the distances from k to each of the n integers is minimized. Define distance between two integers a and b as |a−b|3.
- pbox August 26, 2015 in India| Report Duplicate | Flag | PURGE
Cisco Systems Software Developer - 0of 0 votes
AnswersThis was a question asked to my cousin in a recent phone interview with Cisco.
- Jeanclaude April 25, 2015 in United States
You're given an array of integers (unsorted) and the length is really large (perhaps a million integers). Now you are required to write an efficient code to retrieve topN integers. If N is 10, return the top 10 integers from the array. You result may or may not be sorted, that's your call. For e.g. if given array is arr = { 2, 1, 20, 3, 6, 5, 4, 8, 11, 12 }; and given N value is 3, then your result should be either {20, 11, 12} (unsorted) or {11,12, 20} (sorted).| Report Duplicate | Flag | PURGE
Cisco Systems Development Support Engineer Arrays - 0of 0 votes
AnswersThis was design question.
- shanushaan March 12, 2015 in United States
I have a single timer class which is running on a single port of a machine.
There are multiple clients that can send request to this timer class as follows.
request_timer (x)
where x is time in seconds.
when the timer class gets this request from a client it starts a timer object of x seconds and after x seconds are over it sends an event to the requesting client and client can handle the event the way it wants to .
The problem is if you have large number of clients then the timer class is single point of congestion and the clients may receive the event from it after a long time.
What are the good ways to scale this for a large number of clients?| Report Duplicate | Flag | PURGE
Cisco Systems Analyst Data Structures - 0of 0 votes
AnswersHi, I was asked a this one at the interview. Below is the problem statement:
- vaibhavrastogi4 August 13, 2014 in United States
1) I have a array of n bitstring elements of width m bits, for example:
{1001, 0101, 1100, 0011, 1111, 0000, 0001}
2) We have to apply a filter such that out of these n elements, only k elements pass through the filter while the rest gets blocked, for example
{1001, 0101, 1100, 0011, 1111, 0000, 0001} -- filter -- > {1001, 1100, 1111}
3) Filter has been designed based on a concept of mask and ID.
mask: It tells which bits to consider out of the m bit bitstring elements. Only those bits which are set to '1' would be used for checking while the rest be ignored. for example, a mask of {1000} would mean only 4th bit would be considered for checking while the filter won't care about the other bits of an element.
ID: It is the allowed value for the designed mask. for example, an ID of 1xxx (where x is don't care) with a mask of 1000 means that any element which has 4th bit as '1' would be allowed while if the 4th bit is '0', that element would be blocked. Since the mask doesn't check the 1st, 2nd and 3rd bit, any value, '1' or '0' would be allowed to be passed through the filter
For the above example, a single mask of 1000 and ID of 1xxx solves the problem. We need to find a generic solution for any set of n elements and k allowed elements. All of the k element might not get covered by a single mask and ID. We need to find the optimum solution using minimum number of mask,ID sets with their values.| Report Duplicate | Flag | PURGE
Cisco Systems SDE-2 Algorithm - 0of 2 votes
AnswersWhich is faster?
- talktomenow July 20, 2014 in India
while(1) {}
or
while(2) {}
I said both have same speed as the expression inside while should finally evaluate to true or false. in this case both evaluates to true and there are no extra instructions inside the while so both have same speed of execution. Interviewer said while (1) is faster than while (2).
I do not agree . do you ?
By the way interviewer was a senior manager (i,e. does not code on day-to-day basis)| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer - -3of 3 votes
AnswerC++ Program that uses Linked List to display an Address Book (Name, Address, and Phone number)
- saurabh@schoolcom.in April 13, 2014 in United States
Note:phone numbers format: (xxx)-xxx-xxxx
Address should ..street...City...State...Zip| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer - 0of 0 votes
AnswersThere is a bucket N which contains n nuts of different
- ronnie July 14, 2013 in India for Video processing capabilities
sizes and bucket M of m bolts. Also there is a compare function which will take one bolt and a nut as input and return -1,0,1, respectively if nut size greater, equal, or lesser than bolt. Write an algorithm to find matching nits and bolts. Initially he gave sizes for nuts and bolts instead of compare function so i made use of hash map and solved it. So after that he gave this function and asked if there is a better soution than O(mn) ?| Report Duplicate | Flag | PURGE
Cisco Systems SDE-2 Algorithm - 0of 0 votes
AnswersA car is to be parked in 5x5 matrix parking lane.First of all we have to search the free space in the given matrix and then we have to allocate the memory to the car .Afterwards we have to remove the car from the parking lane.(In C)
- coder June 28, 2013 in India| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Assembly - 0of 0 votes
AnswersDesign an algorithm for a restaurant with a host conditions are when ever a person empties his plate the host will be notified. and when ever number of persons waiting exceeds maximum notify the host.
- DA1 February 25, 2013 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWhich data structure and java design pattern are best fitted for Car Parking problem.
- Mr D December 22, 2012 in India| Report Duplicate | Flag | PURGE
Cisco Systems Algorithm - 0of 0 votes
AnswersI have two threads, both contain data from a database table. One thread performs some operation and update the data in the database table whereas second thread has not yet done any operation. Second thread does operation after some time and wants to update the operation. Since the first thread has already updated the data in the database table, second thread has stale data. How can we manage so that table should have the actual data not the stale data.
- Mr D December 22, 2012 in India| Report Duplicate | Flag | PURGE
Cisco Systems Java - 0of 0 votes
Answersint n=99;
- Mr D December 22, 2012 in India
int unsignedShift = n>>>2;
System.out.println("unsignedShift="+unsignedShift);
The above result gives "unsignedShift=24". The question is if 24 is given how can I get back the original value ie n ie 99. How to do it for both positive and negative integer. How to do it in java.| Report Duplicate | Flag | PURGE
Cisco Systems Java - 0of 0 votes
Answersvery interesting.It's from cisco onsite interview.
- holmespanda November 20, 2012 in United States
write a function, and the output should be the function itself.
can anyone provide the code?| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a big string (str1) find (s1) and replace by (s2).
- jayeshr007 November 07, 2012 in India for NOSTG
Example :
str = "Hi i am abc and i am in abc"
s1 = "abc"
s2 = "pqrstuv"
So final o/p :
str1 = "Hi i am pqrstuv in pqrstuv"| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer C - 0of 0 votes
AnswersGiven a head to linked list and integer as input, write a function to delete all matching elements in the linked list
- horizon_nk August 16, 2012 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Linked Lists - 0of 0 votes
AnswersImplement Malloc() and free() functions. How is the allocation done? What data structures are used ? How will you know much memory has to be freed , like in free(ptr) , how much memory has to be freed?
- Zee August 13, 2012 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer C - 0of 0 votes
AnswersHow will you perform the preorder and inorder traversal of binary trees without using recursion. Basically he asked first to write a method to perform iterative preorder tree traversal and then iterative inorder tree traversal.
- samant.bit July 17, 2012 in India| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere are 1000 tokens numbered as 1001-2000. Two functions allocate and release the tokens and their signatures are as follows, write their implementation
- bobbysanders007 July 01, 2012 in United Statesint alloc_token() { //returns token number } void free_token(int token) { }
| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer - 0of 0 votes
AnswersWhat is address alignment?
struct xx { char a; int b; }; printf("%d", sizeof(struct xx));
what would be output of this printf statement? and what would it be if it is union?
- bobbysanders007 July 01, 2012 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Knowledge Based - 0of 0 votes
AnswersWhen you receive a crash dump for a process from a particular customer, Is it possible to know the line number of which function has caused the problem?
- sekhar June 07, 2012 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Operating System - 0of 0 votes
AnswersHow do you identify which process has crashed in customer env, if there are multiple process crash at same time.
- sekhar June 07, 2012 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Developer Program Engineer Operating System - 0of 0 votes
Answersx = x++ + ++y;
- Lively May 06, 2012 in United States
y = ++x + ++y;
what are the values of x,y after these are executed ?| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer C