Skip to content

Commit 8aa2afb

Browse files
committed
Added LL_shared.h
1 parent 1982df2 commit 8aa2afb

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

LL.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include <stdio.h>
21
#include "LL.h"
32

43
/* For visualization: 4 --> 10 --> 7 --> 5 --> 16 */

LL.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
#ifndef LL_H
22
#define LL_H
33

4-
#include <stdlib.h> //malloc
5-
6-
/* Declaring global struct of type Node, and alias NODE */
7-
typedef struct Node
8-
{
9-
int data;
10-
struct Node* ptr;
11-
} NODE;
12-
4+
#include "LL_shared.h"
5+
#include <stdio.h>
136

147
/* Function Declarations */
158

LL_shared.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef LL_SHARED_H
2+
#define LL_SHARED_H
3+
4+
5+
#include <stdlib.h> //malloc
6+
7+
/* Declaring global struct of tag/type Node, and alias NODE */
8+
typedef struct Node
9+
{
10+
int data;
11+
struct Node* ptr;
12+
} NODE;
13+
14+
15+
#endif // LL_SHARED_H

stack_using_LL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef STACK_USING_LL_H
22
#define STACK_USING_LL_H
33

4-
#include "LL.h"
4+
#include "LL_shared.h"
55

66
typedef NODE STACKITEM;
77

0 commit comments

Comments
 (0)