File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
data_structures/linked_list Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ int main()
37
37
}
38
38
39
39
/**
40
- * push function will add a new node at the head of the list, time complexity O(1).
41
- * @param p pointer to the top of the stack.
42
- * @returns void.
40
+ * push function will add a new node at the head of the list, time complexity O(1)
41
+ * @param p pointer to the top of the stack
42
+ * @returns void
43
43
*/
44
44
void push (struct node * p )
45
45
{
46
46
int item ;
47
47
struct node * temp ;
48
- temp = (struct node * )malloc (sizeof (struct node ));
48
+ temp = (struct node * )malloc (sizeof (struct node ));
49
49
printf ("enter element to be inserted\n" );
50
50
scanf ("%d" , & item );
51
51
temp -> info = item ;
@@ -57,16 +57,16 @@ void push(struct node *p)
57
57
}
58
58
59
59
/**
60
- * pop function deletes the first node from the head, time complexity O(1).
61
- * @param p pointer to the top of the stack.
62
- * @returns void.
60
+ * pop function deletes the first node from the head, time complexity O(1)
61
+ * @param p pointer to the top of the stack
62
+ * @returns void
63
63
*/
64
- void pop (struct node * p )
64
+ void pop (struct node * p )
65
65
{
66
66
int item ;
67
67
struct node * temp ;
68
68
69
- if (top == NULL )
69
+ if (top == NULL )
70
70
printf ("stack is empty\n" );
71
71
else
72
72
{
You can’t perform that action at this time.
0 commit comments