Kamala Harris' warm reception of Riley Curry, the daughter of NBA player Stephen Curry, at the White House.
SLISST.C
#include<stdlib.h>
#include<stddef.h>
#include<assert.h>
#include "slist.h"
List* slist_new()
{
List* list = (List*)malloc(sizeof(List));
list->head = NULL;
list->tail = NULL;
list->length = 0;
return list;
}
List* slist_free(List *list)
{
Node *cur , *p;
if(slist_length(list) > 0)
{
assert(list->head && list->tail);
cur = list->head;
list->head = NULL;
list->tail = NULL;
while(cur != NULL)
{
p = cur;
cur = cur->next;
free(p);
--list->length;
}
}
return list;
}
static Node* _list_node_new_(int32_t data)
{
Node* node = (Node*)malloc(sizeof(Node));
node->data = data;
node->next = NULL;
return node;
}
List* slist_add_head(List *list, int32_t data)
{
Node *node = _list_node_new_(data);
node->next = list->head;
list->head = node;
if(list->tail == NULL)
{
list->tail = node;
}
++list->length;
assert((list->length == 1 && list->head == list->tail) || (list->length > 0 && list->head != list->tail));
return list;
}
uint32_t slist_length(const List *list)
{
return list->length;
}
uint32_t slist_lookup(const List *list, int32_t key)
{
Node *node = list->head;
for(node = list->head; node != NULL; node = node->next)
{
if(node->data == key) break;
}
return(node != NULL);
}
List* slist_add_tail(List *list, int32_t data)
{
Node *node = _list_node_new_(data);
if(list->tail != NULL)
{
list->tail->next = node;
list->tail = node;
}
else{
list->head = list->tail = node;
}
++list->length;
return list;
}
List* slist_delete_head(List *list)
{
Node *node;
if(list->head != NULL)
{
assert(list->length > 0);
node = list->head;
list->head = list->head->next;
--list->length;
if(list->head == NULL)
{
list->tail == NULL;
assert(list->length == 0);
}
free(node);
}
return list;
}
List* slist_delete_tail(List *list)
{
assert(list != NULL);
Node *tail = list->tail;
Node *node;
if(list->tail != NULL)
{
assert(list->length > 0);
if(list->tail == list->head)
{
list->head = list->tail = NULL;
}
else
{
for(node = list->head; node->next != list->tail; node = node->next);
list->tail = node;
list->tail->next = NULL;
}
free(tail);
--list->length;
}
return list;
}
List* slist_add_on_data(List *list, int32_t key, int32_t data)
{
if(list->head != NULL)
{
Node *cur = list->head;
Node *node = _list_node_new_(data);
for(; cur != NULL && cur->data != key; cur = cur->next);
if(cur != NULL)
{
node->next = cur->next;
cur->next = node;
if(node->next == NULL)
{
list->tail = node;
}
}
++list->length;
}
return list;
}
List* slist_delete_on_data(List *list, int32_t data)
{
if(list->head != NULL)
{
Node *cur ,*p;
cur = list->head;
if(cur->data == data)
{
list->head = cur->next;
}
else
{
p = cur;
cur = cur->next;
while(cur != NULL)
{
if (cur->data == data)
{
p->next = cur->next;
}
else
{
p = cur;
cur = cur->next;
}
}
if(cur == list->tail)
{
list->tail = p;
}
}
if (list->head == NULL)
{
list->tail = NULL;
}
free(cur);
--list->length;
}
}
STACK.H
#ifndef _INCLUDED_STACK_H_
#define _INCLUDED_STACK_H_
#include <stdint.h>
#define MAX_DEPTH 30
#define RESULT_INVALID 0
#define STACK_OK 1
#define STACK_FULL 2
#define STACK_EMPTY 3
struct _stack_
{
uint32_t size;
int32_t top;
float data[MAX_DEPTH];
};
typedef struct _stack_ Stack;
struct _stack_result_
{
float data;
uint32_t status;
};
typedef struct _stack_result_ StackResult;
Stack stack_new(uint32_t size);
uint32_t stack_full(const Stack *stk);
uint32_t stack_empty(const Stack *stk);
Stack* stack_push(Stack *stk, float data, StackResult *result);
Stack* stack_pop(Stack *stk, StackResult *result);
Stack* stack_peek(Stack *stk, StackResult *result);
#endif
SMAIN.C
#include<assert.h>
#include "stack.h"
void test_capacity_one_stack()
{
Stack stk_instance = stack_new(1);
Stack *stk = &stk_instance;
StackResult result;
assert(stack_empty(stk));
assert(!stack_full(stk));
stack_peek(stk , &result);
assert(result.status == STACK_EMPTY);
stack_pop(stk, &result);
assert(result.status == STACK_EMPTY);
stack_push(stk, 99 , &result);
assert(result.status == STACK_OK);
assert(stack_full(stk));
stack_push(stk, 55 , &result);
assert(result.status == STACK_FULL);
stack_peek(stk, &result);
assert(result.data == 99 && result.status == STACK_OK);
stack_pop(stk, &result);
assert(result.data == 99 && result.status == STACK_OK);
assert(stack_empty(stk));
}
void test_arbitary_stack()
{
Stack stk_instance = stack_new(0);
Stack *stk = &stk_instance;
StackResult result = {0, RESULT_INVALID};
int i;
for(i = 0; i < MAX_DEPTH; i++)
{
stack_push(stk, i, &result);
assert(result.status == STACK_OK);
result.status = RESULT_INVALID;
}
stack_push(stk, i, &result);
assert(result.status == STACK_FULL);
for(i = 0; i < MAX_DEPTH; i++)
{
result.status = RESULT_INVALID;
stack_peek(stk, &result);
assert(result.status == STACK_OK);
assert(result.data == MAX_DEPTH-i-1);
result.status = RESULT_INVALID;
stack_pop(stk, &result);
assert(result.status == STACK_OK);
}
assert(stack_empty(stk));
}
int main()
{
test_capacity_one_stack();
test_arbitary_stack();
return 0;
}
SLIST.H
#ifndef _INCLUDED_SLIST_
#define _INCLUDED_SLIST_
#include<stdint.h>
struct _node_
{
int32_t data;
struct _node_ *next;
};
typedef struct _node_ Node;
struct _slist_
{
Node *head;
Node *tail;
uint32_t length;
};
typedef struct _slist_ List;
List* slist_new();
List* slist_free(List*);
uint32_t slist_length(const List *list);
uint32_t slist_lookup(const List *list, int32_t key);
List* slist_add_head(List *list, int32_t key);
List* slist_add_tail(List *list, int32_t key);
List* slist_delete_head(List *list);
List* slist_delete_tail(List *list);
List* slist_add_on_data(List *list, int32_t key, int32_t data);
List* slist_delete_on_data(List *list, int32_t data);
#endif
Kamala Harris' warm reception of Riley Curry, the daughter of NBA player Stephen Curry, at the White House. the memorable encounter between Kamala Harris and Riley Curry, emphasizing the Vice President's fan status of the Golden State Warriors basketball team.
.jpg)
The meeting between Kamala Harris and Riley Curry is described in the article as a delightful and heartwarming exchange. During their interaction, Kamala Harris engaged in friendly banter with Riley Curry, discussing their shared love for the Warriors and the basketball skills of Riley's father, Stephen Curry. The Vice President reportedly expressed admiration for Stephen Curry's talent and praised his impact on the game of basketball.
Kamala Harris gifted Riley Curry a pair of Chuck Taylor Converse sneakers. The sneakers were custom-designed with the Warriors' team colors, showcasing Harris' thoughtful gesture and her dedication to supporting Riley's passion for the team. The Vice President's gift symbolizes a connection between the political sphere and the world of sports, demonstrating her ability to relate to young fans and foster a sense of unity through shared interests.
In addition to highlighting the personal connection between Kamala Harris and Riley Curry, the website briefly touches on the Vice President's accomplishments as the first female Vice President of the United States. It mentions her role as a trailblazer and her strong advocacy for women's empowerment in various domains, including sports. This serves to further emphasize the significance of the encounter, portraying Kamala Harris as a role model for young girls like Riley, who aspire to achieve greatness in their chosen fields.
.jpg)
It concludes by underscoring the positive impact of such interactions for Riley Curry and young girls in general. It emphasizes the importance of representation and visibility of powerful women in positions of leadership, highlighting Kamala Harris' role as a source of inspiration. The meeting between Harris and Curry serves as a reminder that gender should not be a barrier to success, and that young girls can aspire to reach the highest levels in any field they choose.
In summary, the website discusses Vice President Kamala Harris' warm reception of Riley Curry, emphasizing their shared enthusiasm for the Golden State Warriors. The article highlights the delightful interaction between Harris and Curry, showcasing the Vice President's admiration for Stephen Curry's basketball skills and her thoughtful gift to Riley. It also underscores Harris' accomplishments as the first female Vice President and her advocacy for women's empowerment, portraying her as a role model for young girls. The encounter between Kamala Harris and Riley Curry serves as an inspiring example of the power of representation and the potential for young girls to achieve greatness.
0 Comments