https://s3-us-west-2.amazonaws.com/secure.notion-static.com/182f6b05-7ed4-4c2a-91b3-bf56e28cbd1e/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/aeb1a064-2214-4bed-9686-406811055595/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7dc6fb77-baee-4f38-ba9c-243fab3d4545/Untitled.png

class Node:
    def __init__(self, data):
        self.data = data
        self.next = None

class LinkedList:
    def __init__(self, value):
        self.head = Node(value)

    def append(self, value):
        cur = self.head
        while cur.next is not None:
            cur = cur.next
        cur.next = Node(value)

    def get_kth_node_from_last(self, k):
        l = []
        cur = self.head

        while cur.next != None:
            l.append(cur.data)
            cur = cur.next

        return l[-k]

linked_list = LinkedList(6)
linked_list.append(7)
linked_list.append(8)

# print(linked_list.get_kth_node_from_last(2))  # 7이 나와야 합니다!
shop_menus = ["만두", "떡볶이", "오뎅", "사이다", "콜라"]
shop_orders = ["오뎅", "콜라", "만두"]

def is_available_to_order(menus, orders):
    i = 0
    cnt = 0

    while i < len(shop_orders):
        j = 0
        
        while j < len(shop_menus):
            if shop_orders[i] == shop_menus[j]:
                cnt += 1
                
                break

            j += 1

        i += 1

    if cnt == 3:
        return True
    else:
        return False

result = is_available_to_order(shop_menus, shop_orders)
# print(result)