Tag:Misjudgment

  • Stack sequential storage

    Time:2020-12-15

    Array implementation stack Create three files: stackearray. H, stackearray. C, stackearraytest. C stackArray.h #ifndef STACK_ARRAY_H_ #define STACK_ARRAY_H_ #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define ADT StackArray //Function: the process of comparison between a and B //Parameters: A, B //Return: a > B returns a […]

  • Circular queue – sequential storage

    Time:2020-11-30

    Array to achieve circular queue Create three files: queuearray. H, queuearray. C, and queuearraytest. C queueArray.h #ifndef QUEUE_ARRAY_H_ #define QUEUE_ARRAY_H_ #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define ADT QueueArray //Function: the process of comparison between a and B //Parameters: A, B //Return: a > […]

  • Circular double ended queue sequential storage

    Time:2020-11-29

    Array implementation of circular double ended queue Create 3 files: doubleendedqueuearray. H, doubleendedqueuearray. C, doubleendedqueuearraytest. C doubleEndedQueueArray.h #ifndef DOUBLE_ENDED_QUEUE_ARRAY_H_ #define DOUBLE_ENDED_QUEUE_ARRAY_H_ #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define ADT DequeArray //Function: the process of comparison between a and B //Parameters: A, B //Return: a […]