Cisco Online Assessment real question sharing & preparation experience (2026 latest)

44 Views
No Comment

Cisco Online Assessment is not particularly difficult overall. I have just finished it. While my memory is still fresh, I want to record the whole process and my real experience. This article will mainly share my entire experience from getting OA to completing the test, including the types of questions I encountered, time allocation, and some of my coping strategies at the time, to provide a reference for students preparing later.

Cisco Online Assessment real question sharing & preparation experience (2026 latest)

Topic 1: FizzBuzz

Question description

When given a number N , for every integer from 1 to N inclusive I, print one value per line, the rules are as follows:

  • If I Are multiples of 3 and 5, print FizzBuzz.
  • If I Is a multiple of 3 but not a multiple of 5, print Fizz.
  • If I Is a multiple of 5 but not a multiple of 3, print Buzz.
  • If I Is neither a multiple of 3 nor a multiple of 5, print I Value.

Write an algorithm that prints the desired output following the above instructions.

Problem-solving ideas

When I got this question, my first reaction was: This is a very basic programming question, which mainly tests the use of loops and conditional judgments.

I implemented it in Java: first read the input integer N, then loop from 1 to N. For each number i, I judge in the following order:

  • If i is divisible by both 3 and 5, print "FizzBuzz";
  • If it is only divisible by 3, print "Fizz";
  • If it is only divisible by 5, print "Buzz";
  • Otherwise, print the number i itself directly.

The entire code structure is very simple, mainly a for loop plus if-else judgment. The time complexity is O(N) and the space complexity is O(1).

I specifically tested it with input 5, and the output was exactly as expected.

Topic 2: Appearance sequence

Question description

Write an algorithm to find the next sequence of a given number as follows: Treat the given number as a string (consisting of digits). For each group of consecutive identical numbers D(Appear N Times), append to the output string N Followed by numbers D.

For example: Number 1211 Consists of a 1, a 2, and two 1's, so the next number in the sequence is 111221.

Enter The input consists of an integer inputNum representing the given number N.

Output Prints a string that is the next sequence formed by reading the given number as a numeric string.

Example Input: 225

Output: 2215

Explain: The given number consists of two 2s and a 5, so we get ’22’ and ’15’, the output is “2215”.

Problem-solving ideas

I use the double pointer method to solve it:

  • First convert the input number into a string;
  • Use two pointers i and j to traverse from left to right, i is fixed at the starting position of the current number, and j keeps moving back until it encounters a different number;
  • In this way, the number of consecutive identical numbers can be counted, and then "number + number" can be spliced ​​into the result;
  • Repeat this process until the entire string has been traversed.

Question 3: Distance between two nodes in a binary search tree

Question description

Write an algorithm to find the distance between two keys in a binary search tree (BST).

Enter

  • The first line of input is an integer Tree_size, represents the number of elements (N) in the binary search tree.
  • The next line is N space-separated integers representing the value of each node in the binary search tree.
  • The third line is an integer Key_size, indicating the number of key values ​​(K).
  • The last line is K space-separated integers, representing the key values ​​that require distance.

Output Prints an integer representing the distance between the given two key values.

Notice

  • The value of K is always 2, that is, there are always two key values.
  • The number of nodes in a binary search tree cannot exceed 100.
  • The value of each node is a non-zero positive integer.
  • There are no rings in BST.
  • Keys in BST are unique, i.e. No two nodes have the same value.
  • Both key values ​​exist in the BST.

Example Input: 8 30 20 15 25 24 40 37 45 2 20 40

Output: 2

Explain:

Text

30
     /  \
   20    40
  /  \   /
15   25 37
     /    \
    24     45

Given two key values ​​20 and 40, the path length from 20 → 30 → 40 is 2, so the output is 2.

Problem-solving ideas

First find the nearest common ancestor (LCA) of the two nodes, then calculate the distance from each node to the LCA, and then add the two distances.

Taking advantage of the ordered nature of BST, the process of finding LCA is very efficient:

  • Traverse starting from the root node,
  • If the values ​​of both nodes are less than the current node, go to the left subtree;
  • If the values ​​of both nodes are greater than the current node, go to the right subtree;
  • Otherwise, the current node is their nearest common ancestor.

After finding the LCA, write a recursive function to go up (or down) from the two nodes to the LCA, and count the number of edges passed. Finally, add the two distances together to get the answer.

Cisco Online Assessment Experience Summary

The above is my complete experience and question sharing of this Cisco Online Assessment. In general, the difficulty of Cisco OA is relatively moderate, but Networking MCQ accounts for a high proportion, and the Coding part also pays more and more attention to the application of trees and graphs. Solving high-frequency questions in advance + allocating time reasonably are the keys to passing.

Special thanks to Programhelp OA traceless assist , real-time ideas and prompts helped me avoid a lot of detours, and finally passed smoothly. If you are also preparing for Cisco OA, I hope this interview experience can help you and get your favorite Offer as soon as possible!

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, has rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END
 0