Language: C

#include "stdio.h"
#include "string.h"

int 	buf[1000000];
int	endBufIndex;
char	command_key_list[4][] = {"insert","delete","deleteFirst","deleteLast"};

void insert(int value, int index) {
	int i = index;

	if(index < 1)
	{
		while(i > 0)
		{
			buf[i] = bud[i-1];
		}
	}
	buf[index] = value;

	endBufIndex++;
}
void delete(int value) {
	for(i = 0; i < 1000000; i++)
	{
		if(buf[i] == value)
		{
			buf[i] == -1;
		}
	}
	endBufIndex--;
}
void deleteFirst(int value) {
	buf[0] == -1;
	endBufIndex--;
}
void deleteFirst(int value) {
	buf[endBufIndex] == -1;
	endBufIndex--;
}


void command_check(char* str) {
	ret = strncmp(str, "insert",11);
	if(ret == 0) return 0;

	ret = strncmp(str, "delete",11);
	if(ret == 0) return 0;

	ret = strncmp(str, "deleteFirst",11);
	if(ret == 0) return 0;

	ret = strncmp(str, "deleteLast",11);
	if(ret == 0) return 0;
}

int main(int argc, char* argv[]) {
	int startIndex = 2000000;
	int i = 0;
	int ret = 0;
	int delCnt = 0;
	int endBufIndex = 0;

	// init
	for(i = 0; i < 1000000; i++)
	{
		buf[i] = -1;
	}

	for(i=1; i < argc; i++)
	{
		// command start
		if(i == 1)
		{
			ret = strncmp(argv[i], "insert",6);
			if(ret != 0) return 0;
		}
		if(delCnt > 20)
		{
			break;
		}
		command_check(argv[i]);
	}

	// Output
	for(i=0; i < 1000000; i++)
	{
		if(i == 0) printf("%d", buf[0]);
		else if(buf[i] == -1) continue;
		else printf(" %d");
	}
	printf("\n");

	return 0;
}


Compiler output:
main.c:6:9: error: array type has incomplete element type 'char[]'
    6 | char    command_key_list[4][] = {"insert","delete","deleteFirst","deleteLast"};
      |         ^~~~~~~~~~~~~~~~
main.c:6:9: note: declaration of 'command_key_list' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'insert':
main.c:15:34: error: 'bud' undeclared (first use in this function); did you mean 'buf'?
   15 |                         buf[i] = bud[i-1];
      |                                  ^~~
      |                                  buf
main.c:15:34: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'delete':
main.c:23:13: error: 'i' undeclared (first use in this function)
   23 |         for(i = 0; i < 1000000; i++)
      |             ^
main.c: At top level:
main.c:36:6: error: redefinition of 'deleteFirst'
   36 | void deleteFirst(int value) {
      |      ^~~~~~~~~~~
main.c:32:6: note: previous definition of 'deleteFirst' with type 'void(int)'
   32 | void deleteFirst(int value) {
      |      ^~~~~~~~~~~
main.c: In function 'command_check':
main.c:43:9: error: 'ret' undeclared (first use in this function)
   43 |         ret = strncmp(str, "insert",11);
      |         ^~~
main.c:44:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   44 |         if(ret == 0) return 0;
      |                             ^
main.c:42:6: note: declared here
   42 | void command_check(char* str) {
      |      ^~~~~~~~~~~~~
main.c:47:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   47 |         if(ret == 0) return 0;
      |                             ^
main.c:42:6: note: declared here
   42 | void command_check(char* str) {
      |      ^~~~~~~~~~~~~
main.c:50:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   50 |         if(ret == 0) return 0;
      |                             ^
main.c:42:6: note: declared here
   42 | void command_check(char* str) {
      |      ^~~~~~~~~~~~~
main.c:53:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   53 |         if(ret == 0) return 0;
      |                             ^
main.c:42:6: note: declared here
   42 | void command_check(char* str) {
      |      ^~~~~~~~~~~~~