/42-Intermediate-Exam

Moulinette-passing versions of Intermediate Exam questions.

Primary LanguageC

42-Intermediate-Exam

Moulinette-passing versions of Intermediate Exam questions.

Questions

Table conventions

Trace test accessibility

When I look at the trace for this question, can I tell what the tests are?

  • 📂 Yes, the tests are accessible.
  • 🔒 No, the tests are locked away in files. It might look something like:
= Test 1 ===================================================
$> ./3sdnrgu2oip0738azjrotz8n test_correct_a_00.txt test_correct_b_00.txt
$> diff -U 3 user_output_test1 test1.output | cat -e
  • 🔮 The trace show something, but not enough to recreate the test ourselves. This is particularly common among questions that take structs as input.

Program vs function

  • ⚙️ Function
  • 📟 Whole program
level question solved? program/
function
trace test
main
0 count_of_2 ⚙️ 📂
0 equation ⚙️ 📂
0 find_pivot ⚙️ 🔒
0 is_anagram ⚙️ 🔒
0 print_doublon ⚙️ 🔒
1
1 count_alpha 📟 📂 📋
1 flood_fill ⚙️ 🔒
1 height_tree ⚙️ 🔮 🚫
1 queue ⚙️ 🔮 🚫
1 stack ⚙️ 🔮 🚫
2
2 is_looping ⚙️ 🔮
2 longest_sequence ⚙️ 🔮
2 ord_alphlong 📟 📂 📋
2 reverse_tree ⚙️ 🔮
2 str_maxlenoc 📟 📂 📋
3
3 can_split ⚙️ 🔮
3 convert_bst ⚙️ 🔮 🚫
3 gold_gain ⚙️ 🔒
3 perimeter ⚙️ 🔮
3 width_tree ⚙️ 🔮
4
4 clone_list ⚙️ 🔮 🚫
4 intersection ⚙️ 🔮 🚫
4 longest_subarray ⚙️ 📂
4 range_comb 🚫 ⚙️ 📂
4 volume_histogram ⚙️ 📂
5
5 count_island 📟 🔒 📋
5 g_diam 🚫 📟 📂 📋
5 infin_add 📟 📂 📋
5 infin_mult 📟 📂 📋

Concepts:

hash table

  • is_anagram
  • count_alpha

implementing data structure

  • queue
  • stack

linked lists

  • is_looping
  • convert_bst (doubly-linked list)
  • clone_list (tetinically doubly-linked list, but really singly-linked list plus weird other)
  • intersection

trees

N-ary tree

  • height_tree

binary tree

  • longest_sequence
  • reverse_tree
  • can_split
  • perimeter
  • width_tree

binary search tree (BST)

  • convert_bst