From c6e7f7ed9ed4b03a3a557d90ff448986b9e3c035 Mon Sep 17 00:00:00 2001 From: Lucas Pedeutour <1+lucas@noreply.localhost> Date: Mon, 11 May 2026 16:55:57 +0000 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Animal Crossing_ Recap those Animals!.html | 2829 ++++++++++++++++++++ assets.tar.gz | Bin 0 -> 1539 bytes 2 files changed, 2829 insertions(+) create mode 100644 Animal Crossing_ Recap those Animals!.html create mode 100644 assets.tar.gz diff --git a/Animal Crossing_ Recap those Animals!.html b/Animal Crossing_ Recap those Animals!.html new file mode 100644 index 0000000..1e2d221 --- /dev/null +++ b/Animal Crossing_ Recap those Animals!.html @@ -0,0 +1,2829 @@ + + +
1.0.3 2026-04-27 10:42 2026-05-04 10:42 submit-* (limit: 3 per week) archi-* (limit: 2 per hour) epita-prepa-computer-science-prog-104-p-06-2030-firstname.lastname
+├── RecapThoseAnimals
+│ ├── Fundamentals
+│ │ ├── double_linked_list
+│ │ │ ├── Makefile
+│ │ │ ├── dlist.c
+│ │ │ ├── dlist.h
+│ │ │ └── main.c
+│ │ └── process
+│ │ ├── Makefile
+│ │ ├── fork.c
+│ │ ├── fork.h
+│ │ └── main.c
+│ └── Proficiencies
+│ └── double_linked_list
+│ ├── Makefile
+│ ├── dlist_merge_sort.c
+│ ├── dlist_merge_sort.h
+│ └── main.c
+├── .gitignore
+└── README
+firstname.lastname with your login. .gitignore file is mandatory. Tests folder. .gitignore file:*.a
+*.lib
+*.o
+*.obj
+*.out
+
+.idea/
+*~
+*.DotSettings.user
+double_linked_list/dlist.c node containing:data,next to the next node,prev to the previous node.dlist containing:size_t size, representing the number of nodes in the listhead to the first node,tail to the last node.struct dlist *dlist_init(void);
+void dlist_clear(struct dlist *list);
+size_t dlist_length(struct dlist *l);
+void dlist_push_front(struct dlist *l, int data);
+void dlist_push_back(struct dlist *l, int data);
+void dlist_remove(struct dlist *list, int data);
+struct dlist *dlist_from_str(char *str);
+struct node *dlist_find(struct dlist *list, int data);
+void dlist_concat(struct dlist *l1, struct dlist *l2);
+void dlist_insert(struct dlist *l, int data, int i);
+ dlist_init that allocates an empty list, initialises size to 0, head and tail to NULL. It should return a pointer to the newly created list. If an error occurs during allocation, return NULL.dlist_clear that frees all nodes in the list, as well as the list structure itself. The list should not be usable after calling this function. If the given list is NULL, don't do anything.struct dlist *dlist_init();
+void dlist_clear(struct dlist *list);
+ struct dlist *l = dlist_init();
+printf("length = %zu\n", l->size); // 0
+printf("head = %p\n", (void *)l->head); // (nil) or NULL
+printf("tail = %p\n", (void *)l->tail); // (nil) or NULL
+dlist_clear(l);
+// l is now invalid
+ dlist_length that computes the number of nodes in the list.head.size field.NULL, the function should return 0.size field is forbidden. Iterate over nodes instead.size_t dlist_length(struct dlist *l);
+ struct dlist *l = dlist_init();
+size_t len = dlist_length(l);
+printf("Length: %zu\n", len); // 0
+dlist_clear(l);
+ dlist_push_front that inserts a new node with the given data at the beginning of the list.next pointer of the newly created node and the prev pointer of the old head.void dlist_push_front(struct dlist *l, int data);
+ struct dlist *l = dlist_init(); // l: NULL
+dlist_push_front(l, 10); // l: 10 -> NULL
+dlist_push_front(l, 20); // l: 20 -> 10 -> NULL
+dlist_clear(l);
+ dlist_push_back that appends a new node with the given data to the end of the list.tail pointer to append the new node.next pointer of the old tail and the prev pointer of the new node. If any error occurs, the list must remain unchanged.void dlist_push_back(struct dlist *l, int data);
+ struct dlist *l = dlist_init();
+dlist_push_back(l, 10); // l: 10 -> NULL
+dlist_push_back(l, 20); // l: 10 -> 20 -> NULL
+dlist_clear(l);
+ dlist_remove that removes the first node whose data matches the given value.NULL or the given value is not found, do nothing.next and prev pointers of neighboring nodes, as well as the head and tail pointers if needed.void dlist_remove(struct dlist *list, int data);
+ struct dlist *l = dlist_init();
+dlist_push_back(l, 1);
+dlist_push_back(l, 2);
+dlist_push_back(l, 3);
+dlist_push_back(l, 2);
+ // l: 1 -> 2 -> 3 -> 2 -> NULL
+dlist_remove(l, 2); // l: 1 -> 3 -> 2 -> NULL
+dlist_remove(l, 2); // l: 1 -> 3 -> NULL
+dlist_remove(l, 2); // l: 1 -> 3 -> NULL
+dlist_clear(l);
+ +) or minus (-) sign, followed by a number. This pattern then repeats: a sign, followed by another number, and so on.struct dlist *dlist_from_str(char *str);
+ dlist_from_str("+2+10+42+2+223-2"); // NULL<->10<->42<->2<->223<->NULL
+dlist_from_str("-2+10+42+2+223-2"); // NULL<->10<->42<->223<->NULL
+dlist_from_str(""); // Return an empty list (size = 0, head = NULL, tail = NULL)
+dlist_from_str("-2-10-42-2-223"); // Return an empty list too
+ dlist_find will return the first node whose data field is equal to the int passed as argument.dlist_find that returns a pointer to the first node whose data matches the given integer.NULL or no matching node is found, the function should return NULL.struct node *dlist_find(struct dlist *list, int data);
+ struct dlist *l = dlist_init();
+dlist_push_back(l, 1);
+dlist_push_back(l, 2);
+dlist_push_back(l, 3);
+dlist_push_back(l, 2);
+ // l: 1 -> 2 -> 3 -> 2 -> NULL
+struct node *n;
+n = dlist_find(l, 1); // n->data == 1
+n = dlist_find(l, 3); // n->data == 3
+n = dlist_find(l, 223); // n == NULL
+dlist_clear(l);
+ dlist_concat that takes two lists and will concatenate them in place into the first list.size, head and tail fields accordingly. Don't forget to update the prev and next pointers between the two lists.NULL, there is nothing to be done.void dlist_concat(struct dlist *l1, struct dlist *l2);
+ struct dlist *l1 = dlist_init();
+for (int i = 0 ; i < 5 ; i++)
+ dlist_push_back(l1, i);
+struct dlist *l2 = dlist_init();
+for (int i = 0 ; i < 5 ; i++)
+ dlist_push_front(l2, i);
+ // l1: 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> NULL
+ // l2: 4 <-> 3 <-> 2 <-> 1 <-> 0 <-> NULL
+dlist_concat(l1, l2); // l1: 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> 4 <-> 3 <-> 2 <-> 1 <-> 0 <-> NULL
+ // l1->size = 10
+dlist_clear(l1); // If you freed correctly, no memory leaks should be displayed on your terminal
+ dlist_insert that takes a list, a value to insert and an index as parameters.head and tail pointers if necessary. Make sure to correctly update the prev and next pointers.NULL or the index is not correct, the function should not do anything.void dlist_insert(struct dlist *l, int data, int i);
+ struct dlist *l = dlist_init();
+for (int i = 0 ; i < 5 ; i++)
+ dlist_push_back(l, i);
+ // l: 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> NULL
+dlist_insert(l, -4, 0); // l: -4 <-> 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> NULL
+dlist_insert(l, 5, 6); // l: -4 <-> 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> 5 <-> NULL
+dlist_insert(l, 5, 12); // l: -4 <-> 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> 5 <-> NULL
+
+dlist_clear(l);
+ process/fork.c fork(2)), you will be printing the prime outcome:"Child speaking: my number [n] is [a prime number]/[not a prime number]\n" ."Parent speaking: stop wasting my time of course [n] is [a prime number]/[not a prime number]\n" ."We both say hi!\n"1 if the number is prime, 0 otherwise.-1.int is_prime(size_t n);
+ ./is_prime 73
+Child speaking: my number 73 is a prime number
+We both say hi!
+Parent speaking: stop wasting my time of course 73 is a prime number
+We both say hi!
+
+./is_prime 42
+Child speaking: my number 42 is not a prime number
+We both say hi!
+Parent speaking: stop wasting my time of course 42 is not a prime number
+We both say hi!
+ "Adding guests..." should be printed, followed by a new line."Guest [name_of_guest] added." should be printed, followed by a new line."My child salutes all of you:", followed by a new line."All guests added successfully.", followed by a new line.-1. Otherwise, it should return 0.fflush(stdout) after your printf calls in both processes.int salute(int num_guests, char *guests[]);
+ ./salute "Mister Mxyzptlk" Bubun Honney
+Adding guests...
+Guest [Mister Mxyzptlk] added.
+Guest [Bubun] added.
+Guest [Honney] added.
+All guests added successfully.
+My child salutes all of you:
+Mister Mxyzptlk
+Bubun
+Honney
+
+./salute
+Adding guests...
+All guests added successfully.
+My child salutes all of you:
+ double_linked_list/dlist_merge_sort/dlist_merge_sort.c main.c file is highly recommended, feel free to use the functions you implemented in the fundamentals part to test your code.dlist_merge_sort that sorts the elements of the given list in increasing order based on their data values, using the merge sort algorithm.NULL, the function should not do anything.void dlist_merge_sort(struct dlist *l);
+ struct dlist *l = dlist_init();
+dlist_push_back(l, 0);
+dlist_push_back(l, 2);
+dlist_push_back(l, 4);
+dlist_push_back(l, 3);
+dlist_push_back(l, 1);
+ // l: 0 <-> 2 <-> 4 <-> 3 <-> 1 <-> NULL
+dlist_merge_sort(l); // l: 0 <-> 1 <-> 2 <-> 3 <-> 4 <-> NULL
+
+dlist_clear(l);
+ dlist_print in the main.c file will not be graded, however it can be useful to test your code.1.0.1 ] 2026-04-27 15:00:00 dlist_remove > instructions: add a reminder to free node 1.0.2 ] 2026-04-27 14:00:00 dlist_init > Example: clarify the size 1.0.3 ] 2026-04-27 13:00:00 dlist_merge_sort > Example: add explanations about dlist_print 1.0.3 ] 2026-04-27 12:00:00 process > instructions: add more instructions about the return value of the function WElW-uH?{l52e3pR$s;ZLIo_RUji{s} z#s%5g7#a%Qc00Z+Cf`m>0+cubhoUnYV(Bn;~w7uS}vq4jU&?Z4ganDyTdzNO3wBA39EP`Z>` z{`Y7>q;`h9OsHKTCwm*#-(V^ir4ge_ftJmMrTCBJmk^>%0u6@~LC2&V(tpTM0;`~Z z5h&E_aCv@w9+w4?kzmm1p?68I5C@SYWnE;^csPnkD8oH)d@P`veEa?NDow`nuf_i} zd`&zWkj?PFY3KOA-)I~EZ!0)Df Y^ zarfXYkHAsf8grL=Z$WMH2tB}QxXl&Nf3SE<$71A6H*;0KnQ!IPgYqM#$r(?|aZTg( z9+a&5)G(APmAGBfT0@Nhu~Mq+n%z^kC$WB2di=ODYc}r?4>NU2u;eruh`z2=db39F z(ELh*klZ@4#84HdmHHv6AEPG(HL&;e)NbH0*y&jF5pw<2^qBO@rI#GS$nin?>fr(o z;k)n;R!a1!In31D<@~JU|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