Cisco Coding OA 2025 – OA代写 – 面试代面 – VO 辅助 – OA assist

Question 1: Maximum Difference Between Elements

Problem Statement:
Given a list of integers, find the maximum difference between two elements where the larger number appears after the smaller number.

Write an algorithm to compute this difference. If no such elements are found, return 0.


Input:

  • The first line contains an integer, inputArray_size, representing the size of the list (N).
  • The next line contains N space-separated integers representing the elements of the list.

Output:
Print an integer representing the maximum difference. Return 0 if no valid pairs exist.


Example:
Input:

7  
2 3 10 6 4 8 1

Output:

8  

Explanation:
From the given list, the maximum difference will be 8 (difference between 2 and 10). The order is valid because 10 appears after 2.


Question 2: Longest Palindromic Substring

Problem Statement:
Given a string, print the longest substring that is the same when read forwards and backwards.

  • If there are multiple substrings of equal length, return the lexicographically smallest one.
  • If no substring is found that meets the criteria, return "None".

Input:
A string, inputStr, representing the given string for the puzzle.

Output:
Print the longest palindromic substring or "None" if no valid substring exists.


Example:
Input:

YABCCBAZ  

Output:

ABCCBA  

Explanation:
The substring "ABCCBA" is the longest palindrome in the string.


Question 3: Hop, Skip, and Jump Matrix

Problem Statement:
Lucy is playing a game on an N x M matrix, starting from cell (1, 1). The goal is to find the last cell Lucy would hop onto after following these rules:

  1. Hop in an anti-clockwise direction around the matrix.
  2. Skip alternate cells during the hop.

Input:

  • The first line contains two integers, matrix_row and matrix_col, representing the number of rows and columns.
  • The next N lines contain space-separated integers representing the elements of the matrix.

Output:
Print an integer representing the last cell Lucy would hop onto after following the given instructions.


Example:
Input:

3 3  
29 8 37
15 41 3
1 10 14

Output:

41  

Explanation:
Lucy starts from (1, 1) and follows the rules, eventually landing on the cell with value 41.

CSOAhelp长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。

CSOAhelp consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.

Leave a Reply

Your email address will not be published. Required fields are marked *