Bu yerda python versiyasi sharhlangan kod bilan: class QueueUsingStacks: def __init__(self): # Ikkita stackni initsiallash: input_stack va output_stack self.input_stack = [] self.output_stack = [] def enqueue ((self, item): # Input_stackga elementlarni qo'shish self.input_stack.append ((item) def dequeue ((self): # Agar output_stack bo'sh bo'lsa, input_stackdan output_stackga barcha elementlarni o'tkazing. self.output_stack: while self.input_stack: self.output_stack.append ((self.input_stack.pop)) #)) Chiqish_stackdan yuqori elementni qaytaring, bu qaytarish navbati oldidagi
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence