The standard optimum Kalman filter demands complete
knowledge of the system parameters, the input forcing functions, and
the noise statistics. Several adaptive methods have already been devised
to obtain the unknown information using the measurements and
the filter residuals.
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)
tr1 byte "Please input the first 64-bit in hex:first - second",0dh,0ah,0
string byte "remener :use enter to tell high 32-bit from low 32-bit",0dh,0ah,0
examp1 byte "eg: 1234ecdf",0dh,0ah,0
examp2 byte " 03ab2543",0dh,0ah,0
CCS編程環境 使用的是匯編加C的混合編程方法:
The programme of the Correlation Algorithm.
Using INT2 to get the input signal.
Array x, in first step, is the input signal produced by programme,
in next step, is the input signal get from A/D,
the length is 128, 32-bit floating point.
Array y, in first step, is the input signal produced by programme,
in next step, is the input signal get from A/D,
the length is 128, 32-bit floating point.
Array cor is the Correlation result, the length is 255, 32-bit floating point.