Citadel SDE Intern OA Preparation & Experience

Citadel SDE Intern OA typically consists of 2 coding problems in 66 minutes, with a strong emphasis on time complexity-you need optimal solutions to Here's a breakdown of my preparation and the two problems I encountered (similar to my friend's experience, along with detailed approaches. Here's a breakdown of my preparation and the two problems I encountered (similar to my friend's experience), along with detailed approaches.

Citadel SDE Intern OA

OA-1

Problem 1: Rotate a Matrix Counter - Clockwise by 90 Degrees and Print by Rows

You are given an N×M matrix. Your task is to rotate it counter - clockwise by 90 degrees and then print its elements row by row.

Analysis.

  • Brute-Force Approach. Create a new M×N matrix, fill it according to the rotation rule, then print its rows. (Space O(M×N), higher time cost.)
  • Optimized Idea. Directly traverse the original matrix column by column-in reverse-starting at the top-right to bottom-left. (Space O(1), faster.)

OA-2

You are given a string s. Your task is to find all palindromic substrings in it. If there are multiple palindromic substrings of the same length, sort them according to.

  1. Length in descending order.
  2. If equal length, lexicographical order.

Example.
Input. "abbaacca"
Output. ["abba", "acca", "aa"]

Analysis.

  • Use center-expansion from each character (and between characters) to find palindromes efficiently.
  • Collect and then sort results by the rules above before outputting.

Final Thoughts

We hope this Citadel SDE Intern OA walkthrough helps guide your preparation. In the end, mastering the basics and practicing smart make all the difference. .

If you're hitting roadblocks. ProgramHelp is here to support you-from coding guidance and OA help to interview coaching and proxy services. Let us help you clear the path and land that dream offer. Let us help you clear the path and land that dream offer.

author avatar
azn7u2@gmail.com
END
 0
Comment(没有评论)