加载中...
public class Solution { public int FindGreatestSumOfSubArray(int[] array) { } }
class Solution { public: int FindGreatestSumOfSubArray(vector
array) { } };
# -*- coding:utf-8 -*- class Solution: def FindGreatestSumOfSubArray(self, array): # write code here
using System; using System.Collections.Generic; class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型一维数组 * @return int整型 */ public int FindGreatestSumOfSubArray (List
array) { // write code here } }
function FindGreatestSumOfSubArray(array) { // write code here } module.exports = { FindGreatestSumOfSubArray : FindGreatestSumOfSubArray };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param array int整型一维数组 # @return int整型 # class Solution: def FindGreatestSumOfSubArray(self , array: List[int]) -> int: # write code here
package main /** * * @param array int整型一维数组 * @return int整型 */ func FindGreatestSumOfSubArray( array []int ) int { // write code here }
/** * * @param array int整型一维数组 * @param arrayLen int array数组长度 * @return int整型 */ int FindGreatestSumOfSubArray(int* array, int arrayLen ) { // write code here }
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # @param array int整型一维数组 # @return int整型 # class Solution def FindGreatestSumOfSubArray(array) # write code here end end
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ def FindGreatestSumOfSubArray(array: Array[Int]): Int = { // write code here } }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ fun FindGreatestSumOfSubArray(array: IntArray): Int { // write code here } }
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ public int FindGreatestSumOfSubArray (int[] array) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ export function FindGreatestSumOfSubArray(array: number[]): number { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ func FindGreatestSumOfSubArray ( _ array: [Int]) -> Int { // write code here } }
struct Solution{ } impl Solution { fn new() -> Self { Solution{} } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param array int整型一维数组 * @return int整型 */ pub fn FindGreatestSumOfSubArray(&self, array: Vec
) -> i32 { // write code here } }
[1,-2,3,10,-4,7,2,-5]
18
[2]
2
[-10]
-10