Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Longest Substring Without Repeating Characters

Language: Layout:
+ ] Show input
Compilation time: 0,31 sec, absolute running time: 0,17 sec, cpu time: 0,17 sec, average memory usage: 21 Mb, average nr of threads: 4, absolute service time: 0,52 sec 
edit mode |  history  | discussion
The input string is abcxylmzabc
 i- cur_len > prev_index :   1 - 1 > -1 ---- [1] = b ------  prev_index = -1 
 i- cur_len > prev_index :   2 - 2 > -1 ---- [2] = c ------  prev_index = -1 
 i- cur_len > prev_index :   3 - 3 > -1 ---- [3] = x ------  prev_index = -1 
 i- cur_len > prev_index :   4 - 4 > -1 ---- [4] = y ------  prev_index = -1 
 i- cur_len > prev_index :   5 - 5 > -1 ---- [5] = l ------  prev_index = -1 
 i- cur_len > prev_index :   6 - 6 > -1 ---- [6] = m ------  prev_index = -1 
 i- cur_len > prev_index :   7 - 7 > -1 ---- [7] = z ------  prev_index = -1 
 i- cur_len > prev_index :   8 - 8 > 0 ---- [8] = a ------  prev_index = 0 
 i- cur_len > prev_index :   9 - 8 > 1 ---- [9] = b ------  prev_index = 1 
 i- cur_len > prev_index :   10 - 8 > 2 ---- [10] = c ------  prev_index = 2 
The length of the longest non repeating character is 8

    
                
λ
.NET NoSQL database for rapid development