leetcode/include/s0023_merge_k_sorted_lists.hpp

18 lines
346 B
C++
Raw Permalink Normal View History

2022-11-21 13:15:56 +00:00
#ifndef S0023_MERGE_K_SORTED_LISTS_HPP
#define S0023_MERGE_K_SORTED_LISTS_HPP
2022-11-14 03:40:07 +00:00
#include <vector>
2023-01-30 12:17:47 +00:00
#include "structures.hpp"
2022-11-14 03:40:07 +00:00
2023-01-30 12:17:47 +00:00
using namespace std;
2022-11-14 03:40:07 +00:00
2022-11-30 10:20:36 +00:00
class S0023 {
2022-11-14 03:40:07 +00:00
public:
2022-11-30 10:20:36 +00:00
ListNode *mergeKLists(vector<ListNode *> &lists);
ListNode *mergeTwoLists(ListNode *a, ListNode *b);
ListNode *merge(vector<ListNode *> &lists, int l, int r);
2022-11-14 03:40:07 +00:00
};
#endif