// MergeSort 30.08 0055.cpp : Ten plik zawiera funkcję „main”. W nim rozpoczyna się i kończy wykonywanie programu.
//
#include <iostream>
using namespace std;
struct node
{
int val;
node* next;
};
void add(node*& H, int x)
{
node* p = new node;
p->val = x;
p->next = H;
H = p;
}
void del(node*& H)
{
if (H != NULL)
{
node* p = H;
H = H->next;
delete p;
}
}
int count(node*& H)
{
node* p = H;
int n = 1;
while (p != NULL)
{
n++;
p = p->next;
}
return n;
}
int half(node*& H, int x)
{
if (H != NULL)
{
node* slow = H;
count(x);
for (int i = 0; i < x; i++)
{
slow = slow->next;
}
}
return slow; //potrzebuje zwrocic wskaznik na element ktory jest polowa listy
}
void show(node* H)
{
node* p = H;
if (H != NULL)
{
node* p = H;
cout << "->" << p->val;
H = H->next;
}
else
cout << "NULL" << endl;
}
void merge(node*& H)
{
node* front = H;
int x = half(H, count(H));
}
int main()
{
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}