Thursday, December 8, 2022
HomeGame Developmentandroid - I can not discover an error within the Java

android – I can not discover an error within the Java


I wrote the supply code for a brand new utility on IOS, when writing there have been no errors, however once I ran the code, an error appeared on this place:

var t = readLine()!
var s = readLine()!
var len_s = s.rely
var t_lis = Set(t)
var c_s   = Counter(s)
var c_t   = Counter(t_lis[len_s])
var c_res = [String: String]()
var summ  = 0
for e in c_s{
    c_res[e] = [c_s[e], min( c_s[e], c_t[e] )]
    summ += c_res[e][1]}
for i in (t.count-s.rely) + 1 {
    if summ == len_s-1{
        print(i)
        break
        
    }
    if t[i] in c_res
            if c_res[t[i]][1] > 0{
            c_res[t[i]][1] -= 1
            summ -= 1
    }
    if i+len_s < t.rely && t[i+len_s] in c_res
        if c_res[ t[i+len_s] ][1] < c_res[ t[i+len_s] ][0]{
            c_res[ t[i+len_s] ][1] += 1
            summ += 1
        
    }
    else
    print(-1)
        }

Who can inform what’s flawed?
And does anybody know a high quality service for code evaluation? Which may make one code distinctive throughout a number of tasks. Thanks prematurely!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments