-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinkedlist.h
More file actions
32 lines (21 loc) · 924 Bytes
/
linkedlist.h
File metadata and controls
32 lines (21 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#define STRING_SIZE 200
struct song_node {
char name[STRING_SIZE];
char artist[STRING_SIZE];
struct song_node *next;
};
struct song_node * insert_front(struct song_node *node, char *artist, char *name);
struct song_node * ordered_insert(struct song_node *node, char *artist, char *name);
int songcmp(struct song_node *a, struct song_node *b);
void print_list(struct song_node *node);
void print_song_node(struct song_node *node);
struct song_node * find_node(struct song_node *node, char *artist, char *name);
struct song_node * find_artist(struct song_node *node, char * artist);
struct song_node * random_node(struct song_node *node);
struct song_node * remove_node(struct song_node *node, char *artist, char *name);
struct song_node * free_list(struct song_node *node);