Hướng dẫn first non repeating character in a string in c++ - ký tự không lặp lại đầu tiên trong một chuỗi trong c ++
Cho một chuỗi S bao gồm các chữ cái Latin thường, nhiệm vụ là tìm ký tự không lặp lại đầu tiên trong S.S consisting of lowercase Latin Letters, the task is to find the first non-repeating character in S. Show
Examples:
Cách tiếp cận ngây thơ:
Lưu ý: Trong Python để tìm sự xuất hiện của một ký tự trong chuỗi có một chuỗi hàm được xây dựng.Count (). In python to find the occurrence of a character in the string there is an In-Built Function string.count(). Dưới đây là việc thực hiện phương pháp trên: Python3
First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f3 = First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f9 First non-repeating character is f0____21 First non-repeating character is f2 = = First non-repeating character is f2 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f3 First non-repeating character is f9__ First non-repeating character is f1 First non-repeating character is f7 First non-repeating character is f3 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f7 index First non-repeating character is f9 = First non-repeating character is f2 First non-repeating character is f1 index = First non-repeating character is f2 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f8 First non-repeating character is f9 Đầu ra First non-repeating character is f Độ phức tạp về thời gian: O (N2), Traverse qua chuỗi cho mỗi ký tự trong chuỗi kích thước N.AUXILIARY SPACE: O (1) O(N2), Traverse over the string for every character in the string of size N. Ký tự không lặp lại đầu tiên bằng cách sử dụng hàm chuỗi tìm ():
Việc tìm kiếm được thực hiện bằng hàm find () được xây dựng.in-built find() function. Dưới đây là việc thực hiện phương pháp này. C++
First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 = 1First non-repeating character is f7 First non-repeating character is f1 = 4
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 = 8index 1
First non-repeating character is f0 "geeksforgeeks" 3"geeksforgeeks" 4
First non-repeating character is f00
First non-repeating character is f0 First non-repeating character is f03 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f07
JavaFirst non-repeating character is f09 First non-repeating character is f10 First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f13 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f17 First non-repeating character is f13 string 6First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f26 First non-repeating character is f27 First non-repeating character is f1 First non-repeating character is f29 First non-repeating character is f2 First non-repeating character is f31 First non-repeating character is f2 First non-repeating character is f7 First non-repeating character is f35 = 9First non-repeating character is f37 First non-repeating character is f7 First non-repeating character is f3 "geeksforgeeks" 4First non-repeating character is f27 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 3"geeksforgeeks" 4First non-repeating character is f13 "geeksforgeeks" 6First non-repeating character is f13 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f54 First non-repeating character is f0 First non-repeating character is f56 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f07 First non-repeating character is f13 "geeksforgeeks" 6
Python3First non-repeating character is f64 First non-repeating character is f65 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f70 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f73 First non-repeating character is f9__12
First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f8 First non-repeating character is f86
First non-repeating character is f3 First non-repeating character is f0 "geeksforgeeks" 3First non-repeating character is f91 = First non-repeating character is f93 First non-repeating character is f94 C#
First non-repeating character is f96 First non-repeating character is f14 First non-repeating character is f15 First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f05 First non-repeating character is f06 First non-repeating character is f07 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f14
First non-repeating character is f1 First non-repeating character is f17 First non-repeating character is f18 First non-repeating character is f19 First non-repeating character is f18 First non-repeating character is f21 First non-repeating character is f22 = 9First non-repeating character is f22 First non-repeating character is f25 First non-repeating character is f18 First non-repeating character is f3 "geeksforgeeks" 4
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 "geeksforgeeks" 3"geeksforgeeks" 4First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f39 First non-repeating character is f15 string 4 First non-repeating character is f42 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f06 First non-repeating character is f47 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f07 First non-repeating character is f0 "geeksforgeeks" 6
JavaScriptFirst non-repeating character is f55 First non-repeating character is f56 First non-repeating character is f57 First non-repeating character is f58 First non-repeating character is f6 First non-repeating character is f60 First non-repeating character is f58 string 6First non-repeating character is f63 First non-repeating character is f1 First non-repeating character is f65 First non-repeating character is f63 string 6First non-repeating character is f68 First non-repeating character is f69 First non-repeating character is f68 First non-repeating character is f3 First non-repeating character is f63 "geeksforgeeks" 6First non-repeating character is f58 "geeksforgeeks" 6First non-repeating character is f58 "geeksforgeeks" 3
First non-repeating character is f79 First non-repeating character is f93 First non-repeating character is f94 First non-repeating character is f82 Đầu ra First non-repeating character is f Độ phức tạp về thời gian: O (N2), Traverse qua chuỗi cho mỗi ký tự trong chuỗi kích thước N.AUXILIARY SPACE: O (1)O(N2) Ký tự không lặp lại đầu tiên bằng cách sử dụng hàm chuỗi tìm ():HashMap and two string traversals.
Thực hiện theo các bước dưới đây để giải quyết vấn đề:
Dưới đây là việc thực hiện phương pháp trên. C++First non-repeating character is f83
First non-repeating character is f87
First non-repeating character is f89 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 = 0First non-repeating character is f95 = 0First non-repeating character is f97 First non-repeating character is f98 First non-repeating character is f0 First non-repeating character is f00 First non-repeating character is f0 = 0First non-repeating character is f03 First non-repeating character is f0 = 0 First non-repeating character is f06 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f09 First non-repeating character is f7 First non-repeating character is f11 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f14
First non-repeating character is f17 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 = 0First non-repeating character is f23 First non-repeating character is f0 = 0 First non-repeating character is f26 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f29 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f32
First non-repeating character is f34
First non-repeating character is f3 "geeksforgeeks" 4First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f43 First non-repeating character is f44 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f47
First non-repeating character is f00
First non-repeating character is f0 First non-repeating character is f90 First non-repeating character is f54 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 = 0 First non-repeating character is f59 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f62 First non-repeating character is f7 = 8index 1First non-repeating character is f18 index 3"geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 = 8= 9First non-repeating character is f74 First non-repeating character is f75 First non-repeating character is f0 First non-repeating character is f77 First non-repeating character is f78 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81
CFirst non-repeating character is f83 First non-repeating character is f84 First non-repeating character is f87
First non-repeating character is f89 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 = 0First non-repeating character is f95 = 0First non-repeating character is f97 First non-repeating character is f98 First non-repeating character is f0 First non-repeating character is f00 First non-repeating character is f0 = 0First non-repeating character is f03 First non-repeating character is f0 = 0 First non-repeating character is f06 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f09 First non-repeating character is f7 First non-repeating character is f11 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f14
First non-repeating character is f17 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 = 0First non-repeating character is f23 First non-repeating character is f0 = 0 First non-repeating character is f26 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f29 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f32
First non-repeating character is f34
First non-repeating character is f3 "geeksforgeeks" 4First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f43 First non-repeating character is f44 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f47
First non-repeating character is f00
First non-repeating character is f0 First non-repeating character is f90 First non-repeating character is f54 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 = 0 First non-repeating character is f59 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f62 First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 index 1First non-repeating character is f65 index 3First non-repeating character is f67 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 First non-repeating character is f73 First non-repeating character is f74 First non-repeating character is f65 First non-repeating character is f76 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81
CFirst non-repeating character is f83 First non-repeating character is f0 First non-repeating character is f777 First non-repeating character is f78 Java First non-repeating character is f09 First non-repeating character is f85 First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 string 6First non-repeating character is f0 First non-repeating character is f15 First non-repeating character is f90 = 0 First non-repeating character is f92 First non-repeating character is f93 "geeksforgeeks" 4
First non-repeating character is f16 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f15 First non-repeating character is f90 First non-repeating character is f98 First non-repeating character is f99 First non-repeating character is f90 First non-repeating character is f01 First non-repeating character is f0 First non-repeating character is f15 string 4 First non-repeating character is f05 First non-repeating character is f7 First non-repeating character is f26 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f14 First non-repeating character is f0 First non-repeating character is f15 = 0 First non-repeating character is f22 First non-repeating character is f0 string 6First non-repeating character is f18 First non-repeating character is f34 First non-repeating character is f18 First non-repeating character is f3 "geeksforgeeks" 4
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 = 0 First non-repeating character is f29 First non-repeating character is f2 First non-repeating character is f31 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f34 First non-repeating character is f25 First non-repeating character is f36 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f64 "geeksforgeeks" "geeksforgeeks" 4
First non-repeating character is f1 First non-repeating character is f39 First non-repeating character is f2 First non-repeating character is f33 First non-repeating character is f7 First non-repeating character is f35 First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f47 First non-repeating character is f18 First non-repeating character is f76 First non-repeating character is f77 First non-repeating character is f78 First non-repeating character is f79 First non-repeating character is f80 First non-repeating character is f18 First non-repeating character is f82 = 9First non-repeating character is f78 First non-repeating character is f85 First non-repeating character is f0 "geeksforgeeks" 6
Python3First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f60 First non-repeating character is f7 = 0 First non-repeating character is f59
First non-repeating character is f73 First non-repeating character is f2 First non-repeating character is f89 = First non-repeating character is f93 First non-repeating character is f64 First non-repeating character is f93 Các First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f9 First non-repeating character is f7 string 08string 09string 10First non-repeating character is f9 = First non-repeating character is f0 "geeksforgeeks" 3 string 16First non-repeating character is f64 string 18First non-repeating character is f89 = First non-repeating character is f93 First non-repeating character is f64 First non-repeating character is f93 Các
First non-repeating character is f3 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f9 First non-repeating character is f7 string 08string 09string 10First non-repeating character is f9 = First non-repeating character is f0 "geeksforgeeks" 3 string 16First non-repeating character is f64 string 18First non-repeating character is f1 index = First non-repeating character is f2 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f8 string 83C#
First non-repeating character is f96
First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f15 = 0 string 93First non-repeating character is f0 First non-repeating character is f15 First non-repeating character is f90 string 97First non-repeating character is f99 First non-repeating character is f90 First non-repeating character is f01 First non-repeating character is f0 First non-repeating character is f15 string 4 = 04First non-repeating character is f06 = 06
First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 = 13
First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f15 = 0 First non-repeating character is f17 First non-repeating character is f06 = 06First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f26 First non-repeating character is f7 = 0 First non-repeating character is f26 First non-repeating character is f7 First non-repeating character is f6 = 33
First non-repeating character is f1 = 36First non-repeating character is f18 First non-repeating character is f34 First non-repeating character is f18 First non-repeating character is f3 "geeksforgeeks" 4
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f47 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f42 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f06 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 = 0 First non-repeating character is f59 First non-repeating character is f7 = 67
First non-repeating character is f18 First non-repeating character is f76 = 72First non-repeating character is f78 First non-repeating character is f79 = 75First non-repeating character is f78 First non-repeating character is f79 First non-repeating character is f80 First non-repeating character is f18 First non-repeating character is f82 = 81First non-repeating character is f78 First non-repeating character is f79 = 84 = 85First non-repeating character is f0 "geeksforgeeks" 6
PHP
‘ First non-repeating character is f56 = 04= 98First non-repeating character is f2
First non-repeating character is f0 "geeksforgeeks" 02 = 92"geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 "geeksforgeeks" 08 "geeksforgeeks" 09
First non-repeating character is f0 = 98"geeksforgeeks" 16"geeksforgeeks" 08"geeksforgeeks" 18First non-repeating character is f7 = 92"geeksforgeeks" 21= 98First non-repeating character is f97 "geeksforgeeks" 08"geeksforgeeks" 25
First non-repeating character is f56 First non-repeating character is f17 = 98First non-repeating character is f2
First non-repeating character is f0 "geeksforgeeks" 02 = 92"geeksforgeeks" 4First non-repeating character is f0 = 04= 98First non-repeating character is f67 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 "geeksforgeeks" 08 "geeksforgeeks" 09First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 "geeksforgeeks" 08 "geeksforgeeks" 09
First non-repeating character is f0 = 98"geeksforgeeks" 16"geeksforgeeks" 08"geeksforgeeks" 18First non-repeating character is f0 string 6First non-repeating character is f56 First non-repeating character is f17 = 98First non-repeating character is f2 First non-repeating character is f7 string 6First non-repeating character is f0 "geeksforgeeks" 41 "geeksforgeeks" 42
First non-repeating character is f3 "geeksforgeeks" 4First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f0 = 92"geeksforgeeks" 21= 98First non-repeating character is f97 "geeksforgeeks" 08"geeksforgeeks" 67
First non-repeating character is f67
First non-repeating character is f5 First non-repeating character is f1 First non-repeating character is f0 "geeksforgeeks" 41 "geeksforgeeks" 97
First non-repeating character is f65 = 98First non-repeating character is f97 "geeksforgeeks" 41index 15
First non-repeating character is f
Đầu raHashMap and single string traversal
Ký tự không lặp lại đầu tiên bằng cách sử dụng hashmap và chuỗi chuỗi đơn
Bây giờ đi qua Count_array [] và tìm ký tự có giá trị xuất hiện và giá trị tần số ít nhất là thống nhất. C++
Trả lại nhân vật đó. First non-repeating character is f87 Dưới đây là việc thực hiện phương pháp trên.
First non-repeating character is f0 index 28= 0index 30= 0index 32
First non-repeating character is f7 index 39First non-repeating character is f7 index 41First non-repeating character is f0 "geeksforgeeks" 6
First non-repeating character is f17 First non-repeating character is f90 First non-repeating character is f91 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 index 37First non-repeating character is f0 = 0 index 46
First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 index 51
First non-repeating character is f7 First non-repeating character is f1 index 54
First non-repeating character is f0 "geeksforgeeks" 3 index 59
First non-repeating character is f00 First non-repeating character is f0 First non-repeating character is f90 First non-repeating character is f54 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 index 78First non-repeating character is f65 index 80First non-repeating character is f67 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 = 81First non-repeating character is f65 index 89First non-repeating character is f74 First non-repeating character is f65 First non-repeating character is f76 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81
C
First non-repeating character is f83 First non-repeating character is f84 First non-repeating character is f87 First non-repeating character is f001 First non-repeating character is f002 First non-repeating character is f0 = 0 First non-repeating character is f14 First non-repeating character is f0 = 0 First non-repeating character is f47 First non-repeating character is f009 First non-repeating character is f001 First non-repeating character is f011 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 First non-repeating character is f001 First non-repeating character is f017 First non-repeating character is f001 First non-repeating character is f019 First non-repeating character is f98 First non-repeating character is f0 First non-repeating character is f7 First non-repeating character is f00 First non-repeating character is f0 First non-repeating character is f001 First non-repeating character is f026 First non-repeating character is f0 = 0 First non-repeating character is f06 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f29 First non-repeating character is f7 First non-repeating character is f034 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f037
First non-repeating character is f039 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f14
First non-repeating character is f17 First non-repeating character is f90 First non-repeating character is f91
First non-repeating character is f0 First non-repeating character is f001 First non-repeating character is f053 First non-repeating character is f0 = 0 First non-repeating character is f056 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f059 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f062
First non-repeating character is f064 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f43 First non-repeating character is f44 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f072
First non-repeating character is f00
First non-repeating character is f0 First non-repeating character is f90 First non-repeating character is f54 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 = 0 First non-repeating character is f59 First non-repeating character is f0 First non-repeating character is f1 index 74First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 "geeksforgeeks" 99First non-repeating character is f65 index 02First non-repeating character is f67 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 First non-repeating character is f62 First non-repeating character is f0 = 81First non-repeating character is f65 index 89First non-repeating character is f74 First non-repeating character is f65 First non-repeating character is f76 First non-repeating character is f0 First non-repeating character is f77 First non-repeating character is f78 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81
JavaFirst non-repeating character is f09 First non-repeating character is f10 First non-repeating character is f11 First non-repeating character is f116 First non-repeating character is f0 = 0 First non-repeating character is f119 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f12222222 First non-repeating character is f124 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f128 First non-repeating character is f129 First non-repeating character is f2 "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f128 First non-repeating character is f134 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 string 4 First non-repeating character is f140 First non-repeating character is f128 First non-repeating character is f142
First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f15 First non-repeating character is f90 = 0 First non-repeating character is f92 First non-repeating character is f93 "geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f15 First non-repeating character is f155 First non-repeating character is f7 "geeksforgeeks" 72First non-repeating character is f99 First non-repeating character is f159 First non-repeating character is f0 First non-repeating character is f15 string 4 First non-repeating character is f05 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f36
First non-repeating character is f1 First non-repeating character is f175 First non-repeating character is f18 First non-repeating character is f177
First non-repeating character is f5 string 6First non-repeating character is f18 First non-repeating character is f184 First non-repeating character is f99 First non-repeating character is f186
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f15 = 0 First non-repeating character is f22 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f26 First non-repeating character is f7 = 0 First non-repeating character is f203 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f206 First non-repeating character is f74 First non-repeating character is f208
First non-repeating character is f211
First non-repeating character is f214
First non-repeating character is f1 First non-repeating character is f217 First non-repeating character is f2 First non-repeating character is f219 First non-repeating character is f18 First non-repeating character is f221
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f072 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f60 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f64 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 = 0 First non-repeating character is f59 First non-repeating character is f7 First non-repeating character is f35
First non-repeating character is f248 First non-repeating character is f18 First non-repeating character is f76 First non-repeating character is f251 First non-repeating character is f78 First non-repeating character is f79 First non-repeating character is f254 First non-repeating character is f18 First non-repeating character is f82 = 9First non-repeating character is f78 First non-repeating character is f85 First non-repeating character is f0 "geeksforgeeks" 6
Python3First non-repeating character is f09 First non-repeating character is f264 First non-repeating character is f89 = First non-repeating character is f93 First non-repeating character is f64 First non-repeating character is f17 First non-repeating character is f270 First non-repeating character is f271 First non-repeating character is f0 First non-repeating character is f273 = First non-repeating character is f275 First non-repeating character is f6 First non-repeating character is f7__ First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f279 First non-repeating character is f286 First non-repeating character is f7 First non-repeating character is f288 = First non-repeating character is f97 First non-repeating character is f25 index 30__125First non-repeating character is f294 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7__18 Các Các First non-repeating character is f0 First non-repeating character is f327 = First non-repeating character is f329 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f279 First non-repeating character is f286 First non-repeating character is f7 First non-repeating character is f288 = First non-repeating character is f97 First non-repeating character is f25 index 30__125First non-repeating character is f294 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7__18 Các Các First non-repeating character is f0 First non-repeating character is f327 = First non-repeating character is f329 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f338 First non-repeating character is f25 First non-repeating character is f93 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 = 9index 30First non-repeating character is f270 First non-repeating character is f381 C#‘ First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f354 First non-repeating character is f11 First non-repeating character is f116 First non-repeating character is f0 = 0 First non-repeating character is f119 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f12222 First non-repeating character is f124 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f128 First non-repeating character is f401 First non-repeating character is f7 First non-repeating character is f128 First non-repeating character is f134 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f409 string 4 First non-repeating character is f140 First non-repeating character is f128 First non-repeating character is f142
First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f419 = 0 string 93First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 First non-repeating character is f425 First non-repeating character is f90 First non-repeating character is f427 First non-repeating character is f7 "geeksforgeeks" 72First non-repeating character is f99 First non-repeating character is f425 First non-repeating character is f90 First non-repeating character is f433 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 = 04First non-repeating character is f06 = 06First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f447
First non-repeating character is f1 First non-repeating character is f450 First non-repeating character is f18 First non-repeating character is f452
First non-repeating character is f5 string 6First non-repeating character is f18 First non-repeating character is f459 First non-repeating character is f99 First non-repeating character is f461
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f39 First non-repeating character is f15 = 0 First non-repeating character is f17 First non-repeating character is f06 = 06First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f26 First non-repeating character is f7 = 0 First non-repeating character is f481 = 0First non-repeating character is f483 First non-repeating character is f7 First non-repeating character is f6 = 33
First non-repeating character is f1 First non-repeating character is f489 First non-repeating character is f18 First non-repeating character is f491 First non-repeating character is f18 First non-repeating character is f493
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f072 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f507 First non-repeating character is f06 First non-repeating character is f509 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f06 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 = 0 First non-repeating character is f59 First non-repeating character is f7 = 67
First non-repeating character is f523 = 0First non-repeating character is f525 First non-repeating character is f18 First non-repeating character is f76 First non-repeating character is f251 First non-repeating character is f78 First non-repeating character is f79 First non-repeating character is f254 First non-repeating character is f18 First non-repeating character is f82 = 9First non-repeating character is f78 = 85First non-repeating character is f0 "geeksforgeeks" 6
JavaScriptFirst non-repeating character is f55 First non-repeating character is f541 First non-repeating character is f56 First non-repeating character is f543
First non-repeating character is f0 First non-repeating character is f546 First non-repeating character is f99 First non-repeating character is f548 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f551 First non-repeating character is f7 First non-repeating character is f553 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f558 First non-repeating character is f7 First non-repeating character is f560 First non-repeating character is f7 First non-repeating character is f562 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f566 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f569 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f572
First non-repeating character is f574 First non-repeating character is f0 "geeksforgeeks" 3 index 59
First non-repeating character is f579 "geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f582 First non-repeating character is f1 First non-repeating character is f584 First non-repeating character is f0 First non-repeating character is f586 First non-repeating character is f1 First non-repeating character is f67 First non-repeating character is f5 First non-repeating character is f0 First non-repeating character is f586 = 9First non-repeating character is f593 First non-repeating character is f82 Đầu ra First non-repeating character is f Độ phức tạp về thời gian: O (n), vì chuỗi cần được đi qua ít nhất một lần. Không gian của bạn: O (256), không gian bị chiếm bởi việc sử dụng Count_array/Hash_map để theo dõi tần số. O(N), As the string needs to be traversed at least once. Ký tự không lặp lại đầu tiên bằng cách sử dụng mảng đếm và chuỗi chuỗi đơn:
Thực hiện theo các bước dưới đây để giải quyết vấn đề:
Dưới đây là việc thực hiện phương pháp trên. C++First non-repeating character is f595 First non-repeating character is f83
First non-repeating character is f601
First non-repeating character is f0 = 0 First non-repeating character is f605 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f610 First non-repeating character is f7 First non-repeating character is f612 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f617 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f620
First non-repeating character is f622 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f5 string 6
First non-repeating character is f629 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 = 0 index 46First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f641 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f644
First non-repeating character is f646 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0____21 First non-repeating character is f651 First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f654 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 "geeksforgeeks" 3 index 59
First non-repeating character is f00
First non-repeating character is f0 First non-repeating character is f665 First non-repeating character is f0 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 = 0 First non-repeating character is f672 First non-repeating character is f0____21 First non-repeating character is f675 First non-repeating character is f7 = 8index 1First non-repeating character is f18 index 3"geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 = 8= 9First non-repeating character is f74 First non-repeating character is f688 First non-repeating character is f0 "geeksforgeeks" 3 First non-repeating character is f81
JavaFirst non-repeating character is f14 First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 = 0 First non-repeating character is f22 First non-repeating character is f0 string 6First non-repeating character is f7 = 0First non-repeating character is f705
First non-repeating character is f99 = 0First non-repeating character is f97 First non-repeating character is f93 First non-repeating character is f712 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f719 First non-repeating character is f93 First non-repeating character is f721
First non-repeating character is f723 First non-repeating character is f2 "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f36
First non-repeating character is f1 First non-repeating character is f735 First non-repeating character is f2 First non-repeating character is f33 First non-repeating character is f18 First non-repeating character is f739
First non-repeating character is f5 string 6
First non-repeating character is f18 First non-repeating character is f746 First non-repeating character is f747 "geeksforgeeks" 4
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 = 0 First non-repeating character is f755 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f719 First non-repeating character is f93 First non-repeating character is f764
First non-repeating character is f1 First non-repeating character is f767 First non-repeating character is f25 First non-repeating character is f2 First non-repeating character is f18 First non-repeating character is f771 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f776
First non-repeating character is f1 First non-repeating character is f2 "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f5
First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f793 First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f797 First non-repeating character is f7 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 = 0 First non-repeating character is f672 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f807 First non-repeating character is f2 First non-repeating character is f2
First non-repeating character is f35 First non-repeating character is f18 First non-repeating character is f1 First non-repeating character is f67 First non-repeating character is f7 First non-repeating character is f5
First non-repeating character is f35 First non-repeating character is f18 = 9First non-repeating character is f18 First non-repeating character is f822 First non-repeating character is f0 "geeksforgeeks" 6
Python3First non-repeating character is f09 First non-repeating character is f264 First non-repeating character is f64 First non-repeating character is f17 First non-repeating character is f270 First non-repeating character is f271 First non-repeating character is f0 First non-repeating character is f833 = First non-repeating character is f97___ First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f279 First non-repeating character is f0 First non-repeating character is f301 First non-repeating character is f0 First non-repeating character is f270 First non-repeating character is f304 Các
First non-repeating character is f868 string 09First non-repeating character is f0__ First non-repeating character is f7 First non-repeating character is f5 First non-repeating character is f6
First non-repeating character is f868 string 09First non-repeating character is f0__ First non-repeating character is f0 First non-repeating character is f327 = First non-repeating character is f329 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f279 First non-repeating character is f0 First non-repeating character is f93 First non-repeating character is f271 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f901 = First non-repeating character is f25 First non-repeating character is f271
First non-repeating character is f327 = First non-repeating character is f348 First non-repeating character is f909 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f912 = __ First non-repeating character is f367 First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f7 "geeksforgeeks" 3 First non-repeating character is f354 First non-repeating character is f270 = "geeksforgeeks" First non-repeating character is f929 = First non-repeating character is f17 First non-repeating character is f270 First non-repeating character is f2 First non-repeating character is f1 First non-repeating character is f935 = __ First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f271 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f2 First non-repeating character is f5 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f9 First non-repeating character is f0 = 9 First non-repeating character is f9 First non-repeating character is f953 First non-repeating character is f0 First non-repeating character is f270 First non-repeating character is f956 C#
First non-repeating character is f96 First non-repeating character is f14 First non-repeating character is f11 First non-repeating character is f12 First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 = 0 First non-repeating character is f17 First non-repeating character is f06 = 06First non-repeating character is f0 string 6First non-repeating character is f7 = 0First non-repeating character is f705
First non-repeating character is f99 = 0First non-repeating character is f978 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f610
First non-repeating character is f612 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f447
First non-repeating character is f1 First non-repeating character is f620 First non-repeating character is f18 First non-repeating character is f622
First non-repeating character is f5 string 6First non-repeating character is f18 First non-repeating character is f629
First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 = 0 First non-repeating character is f755 First non-repeating character is f7 First non-repeating character is f6 First non-repeating character is f0 = 0 First non-repeating character is f24 First non-repeating character is f25 First non-repeating character is f719 First non-repeating character is f93 First non-repeating character is f764
First non-repeating character is f1 First non-repeating character is f767 First non-repeating character is f25 First non-repeating character is f2 First non-repeating character is f18 First non-repeating character is f019 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f776
First non-repeating character is f1 First non-repeating character is f2 "geeksforgeeks" 4First non-repeating character is f7 First non-repeating character is f5
First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f14 First non-repeating character is f15 string 4 First non-repeating character is f793 First non-repeating character is f0 string 6First non-repeating character is f7 = 0 First non-repeating character is f672 First non-repeating character is f7 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f7 = 0 First non-repeating character is f672 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f807 First non-repeating character is f2 First non-repeating character is f2
First non-repeating character is f18 First non-repeating character is f1 First non-repeating character is f67 First non-repeating character is f7 First non-repeating character is f5
First non-repeating character is f18 = 9First non-repeating character is f18 First non-repeating character is f067 First non-repeating character is f0 "geeksforgeeks" 6
First non-repeating character is f09 First non-repeating character is f264First non-repeating character is f55 First non-repeating character is f64 First non-repeating character is f17 First non-repeating character is f270 First non-repeating character is f271
First non-repeating character is f0 First non-repeating character is f833 = First non-repeating character is f97___ First non-repeating character is f0 First non-repeating character is f081 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f279 First non-repeating character is f0 First non-repeating character is f301 First non-repeating character is f0 First non-repeating character is f270 First non-repeating character is f304 First non-repeating character is f7 First non-repeating character is f612 Các First non-repeating character is f0 string 6First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f098 First non-repeating character is f7 string 6
First non-repeating character is f102 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f7 First non-repeating character is f5 First non-repeating character is f7 string 6
First non-repeating character is f110 First non-repeating character is f7 "geeksforgeeks" 6First non-repeating character is f0 "geeksforgeeks" 6
First non-repeating character is f868 string 09First non-repeating character is f0__ First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f0 First non-repeating character is f076 First non-repeating character is f122 First non-repeating character is f7 First non-repeating character is f1 First non-repeating character is f644
First non-repeating character is f771 First non-repeating character is f0 "geeksforgeeks" 6First non-repeating character is f0 First non-repeating character is f1 First non-repeating character is f132 "geeksforgeeks" 3 First non-repeating character is f654 First non-repeating character is f0 First non-repeating character is f5 "geeksforgeeks" 3 index 59
First non-repeating character is f076 First non-repeating character is f044 First non-repeating character is f0 = 60"geeksforgeeks" "geeksforgeeks" 4First non-repeating character is f0 First non-repeating character is f076 First non-repeating character is f672 First non-repeating character is f0____21 First non-repeating character is f151 First non-repeating character is f7 First non-repeating character is f586 First non-repeating character is f1 First non-repeating character is f67 First non-repeating character is f0 First non-repeating character is f5 First non-repeating character is f7 First non-repeating character is f586 = 9First non-repeating character is f822 First non-repeating character is f82 Đầu ra First non-repeating character is f Độ phức tạp về thời gian: O (n), vì chuỗi cần phải đi qua không gian onceauxiliary: O (1), không gian bị chiếm bởi việc sử dụng số lượng đếm để theo dõi tần số.: O(N),
As the string needs to be traversed once Nhân vật không lặp lại đầu tiên bằng cách sử dụng các hàm Python tích hợp:
Thực hiện theo các bước dưới đây để giải quyết vấn đề:
Dưới đây là việc thực hiện phương pháp trên: Python3First non-repeating character is f163 First non-repeating character is f164 First non-repeating character is f09 First non-repeating character is f166 First non-repeating character is f64 First non-repeating character is f168 First non-repeating character is f0 First non-repeating character is f170 = First non-repeating character is f172 First non-repeating character is f0 First non-repeating character is f6 First non-repeating character is f7 First non-repeating character is f8 First non-repeating character is f9 Các ‘
First non-repeating character is f3
First non-repeating character is f196 Đầu ra First non-repeating character is f Độ phức tạp về thời gian: O (n), vì chuỗi cần phải đi qua không gian onceauxiliary: O (1), không gian bị chiếm bởi việc sử dụng số lượng đếm để theo dõi tần số.O(N). As the string needs to be traversed at least once. Nhân vật không lặp lại đầu tiên bằng cách sử dụng các hàm Python tích hợp: Ý tưởng là tìm tần số của tất cả các ký tự trong chuỗi và kiểm tra ký tự nào có tần số đơn vị.Aarti_Rathi. Làm thế nào để bạn in ký tự không lặp lại đầu tiên từ chuỗi C?Chương trình để tìm ký tự không lặp lại đầu tiên trong một chuỗi.. / * C Chương trình để tìm ký tự không lặp lại đầu tiên */. #include. #include. #Define no_of_chars 256 .. int *get_char_count (char *str). int *Count = (int *) calloc (sizeof (int), no_of_chars) ;. Làm thế nào để tôi có được một ký tự không lặp lại trong một chuỗi?Các ký tự không lặp lại là các ký tự chỉ có trong chuỗi một lần.Để tìm các ký tự không lặp lại trong một chuỗi, chúng tôi sẽ sử dụng một vòng để tính tần số của từng ký tự và in các ký tự có tần số đếm một lần sử dụng một vòng khác cho vòng lặp.
Làm thế nào để bạn có được ký tự duy nhất đầu tiên trong một chuỗi?Để tìm chỉ mục của ký tự duy nhất đầu tiên có trong chuỗi đã cho, chúng ta có thể sử dụng HashMap.Ý tưởng là đi qua tất cả các ký tự của chuỗi và tạo một hashmap có khóa là ký tự và giá trị là sự xuất hiện của nó.use the hashmap. The idea is to go through all the characters of the string and create a hashmap with Key as the character and Value as its occurrences.
Làm thế nào để tôi tìm thấy ký tự không lặp lại đầu tiên trong một chuỗi trong CPP?Hãy xem các bước để giải quyết vấn đề ... Khởi tạo chuỗi .. Khởi tạo một bản đồ char và mảng để lưu trữ tần số của các ký tự trong chuỗi .. Lặp lại chuỗi .. Tìm tần số của từng ký tự và lưu trữ chúng trong bản đồ .. Lưu trữ chỉ số của nhân vật là tốt .. |