public ListNode mergeKLists_bad(List<ListNode> lists) {

    ListNode dummy = new ListNode(0);
    ListNode head = dummy;

    if (lists == null) {
      return null;
    }

    while (lists.size() > 1) {
      ListNode min = new ListNode(Integer.MAX_VALUE);

      Iterator<ListNode> ite = lists.iterator();

      while (ite.hasNext()) {
        ListNode list = ite.next();
        if (list != null && list.val < min.val) {
          min = list;
        }
      }

      head.next = min;
      head = head.next;
      min = min.next;
    }

    if (lists.size() == 1) {
      head.next = lists.get(0);
    }

    return dummy.next;
  }