加载中...
import java.util.*; public class Solution { /** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ public String LCS (String s1, String s2) { // write code here } }
class Solution { public: /** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ string LCS(string s1, string s2) { // write code here } };
# # longest common subsequence # @param s1 string字符串 the string # @param s2 string字符串 the string # @return string字符串 # class Solution: def LCS(self , s1 , s2 ): # write code here
using System; using System.Collections.Generic; class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ public string LCS (string s1, string s2) { // write code here } }
/** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ function LCS( s1 , s2 ) { // write code here } module.exports = { LCS : LCS };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # longest common subsequence # @param s1 string字符串 the string # @param s2 string字符串 the string # @return string字符串 # class Solution: def LCS(self , s1: str, s2: str) -> str: # write code here
package main /** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ func LCS( s1 string , s2 string ) string { // write code here }
/** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ char* LCS(char* s1, char* s2 ) { // write code here }
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # longest common subsequence # @param s1 string字符串 the string # @param s2 string字符串 the string # @return string字符串 # class Solution def LCS(s1, s2) # write code here end end
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ def LCS(s1: String,s2: String): String = { // write code here } }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ fun LCS(s1: String,s2: String): String { // write code here } }
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ public String LCS (String s1, String s2) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ export function LCS(s1: string, s2: string): string { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ func LCS ( _ s1: String, _ s2: String) -> String { // write code here } }
struct Solution{ } impl Solution { fn new() -> Self { Solution{} } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * @return string字符串 */ pub fn LCS(&self, s1: String, s2: String) -> String { // write code here } }
"1A2C3D4B56","B1D23A456A"
"123456"
"abc","def"
"-1"
"abc","abc"
"abc"
"ab",""
"-1"