Hello Sunil ji upload more videos on python , thanks for this Channel
@ItJunction4all
Жыл бұрын
Sure Abhishek ! Will upload soon
@kirankumarkalli371
2 жыл бұрын
from collections import deque def main(): s1 ="aabccbdcbe" q = deque() for i in s1 : if s1.count(i) ==1 : q.append(i) print("first non repeating character",q.popleft()) if __name__ == "__main__": main() ### Hi Sunil in the method solved above dictonary Map was used to store the count of character but it is not an order collection so it might return 'e' also in the ouput , in place of map listmap can be used to resolve it 🙂.
Пікірлер: 3