← 返回 amazon 的题目列表Static vs Dynamic Allocation in C
类型:online_judge
amazon
Amazon's software team utilizes several algorithms to maintain data integrity and they note that symmetric data can be beneficial in some cases. A programmer needs to decide whether static or dynamic memory allocation should be used.
Given a string consisting of lowercase English letters, rearrange it to become symmetrical. Then indicate whether static or dynamic allocation should be used.
Input Format:
A string (length up to $10^5$).
Output Format:
Return "static allocation" if static is recommended, otherwise "dynamic allocation".
Example:
Input: "abba"
Output: "static allocation"
Input: "abc"
Output: "dynamic allocation"
Example
Input
radar