虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

您现在的位置是:虫虫下载站 > 资源下载 > 其他 > Problem Statement You are given a string input. You are to find the longest substring of input su

Problem Statement You are given a string input. You are to find the longest substring of input su

  • 资源大小:2 K
  • 上传时间: 2015-09-21
  • 上传用户:spy0207
  • 资源积分:2 下载积分
  • 标      签: input Statement You are

资 源 简 介

Problem Statement You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the string that occurs earliest in input. Definition Class: ReverseSubstring Method: findReversed Parameters: string Returns: string Method signature: string findReversed(string input) (be sure your method is public) Notes The substring and its reversal may overlap partially or completely. The entire original string is itself a valid substring (see example 4). Constraints input will contain between 1 and 50 characters, inclusive. Each character of input will be an uppercase letter ( A - Z ). Examples 0) "XBCDEFYWFEDCBZ" Returns: "BCDEF" We see that the reverse of BCDEF is FEDCB, which appears later in the string. 1)

相 关 资 源

您 可 能 感 兴 趣 的