Top Level Namespace
Included Modules
- Pars3k
Extended Modules
- Pars3k
Defined in:
Constant Summary
-
EMPTY =
'L'
-
FLOOR =
'.'
-
OCCUPIED =
'#'
Method Summary
- adjacent(state, ray_trace, row, column)
- any_of(parsers)
- any_value
- bag
- bags
-
bounded_int(from, to)
Not checking the 4 length criteria, because the numbers al already bound to 4 digic numbers
- can_change(line)
- change(instructions, i)
- change_op(original_op)
- check_passports(input, parser)
- checked_fields
- chinese_remainder(mods, remainders)
- contains_all?(fields)
- contiguos(input, target)
- contiguos_loop(input, target, start, finish)
- dep
- end_of_input
- error(err)
- evaluate(input, pc, hits)
- exactly(num, parser)
-
extended_gcd(a, b)
Inspired in https://rosettacode.org/wiki/Chinese_remainder_theorem#Crystal
- fields(fieldsP)
- find_inner_containers(containerd_map, search)
- find_outter_containers(deps_map, search)
- hex
- instruction
- instruction_line
- int
- invalid(ticket, rules)
- invalid?(ticket, rules)
- invmod(e, et)
- is_empty(seat)
- is_floor(seat)
- is_occupied(seat)
- is_sum?(value, possibilities)
- key_value(key, value_parser)
- letter
- mangle_adress(adress, mask)
- mangle_value(value, mask)
- mask(input, mask)
- merge(xs, ys)
- neighbours(map, x, y, z)
- number
- numbered_bag
- offset
- parse!(parser, input)
- question_all?(answers)
- question_any?(answers)
- ray_trace(state, direction, starting, step)
- remove_one(ls, x)
- rule(line)
- seat(input)
- seat_id(seat)
- set(value, bit, position)
- solve_10_1(input)
- solve_10_2(input)
- solve_11(input, ray_trace, tolerance)
- solve_11_1(input)
- solve_11_2(input)
- solve_12(input, ship)
- solve_12_1(input)
- solve_12_2(input)
- solve_13_1(target, needle)
- solve_13_2(needle)
- solve_14_1(input)
- solve_14_2(input)
- solve_15_1(input)
- solve_15_2(input)
- solve_16_1(rules_lines, tickets)
- solve_16_2(rules_lines, tickets, mine)
- solve_16_2_go(rules, values)
- solve_17_1(input)
- solve_17_2(input)
- solve_1_1(report)
- solve_1_2(report)
- solve_2_1(passwords)
- solve_2_2(passwords)
- solve_3_1(levels)
- solve_3_2(levels)
- solve_4_1(input)
-
solve_4_2(input)
TODO This is bugged, it yeild too big of a number
- solve_5_1(input)
- solve_5_2(input)
- solve_6(input, f)
- solve_6_1(input)
- solve_6_2(input)
- solve_7_1(input)
- solve_7_2(input)
- solve_8_1(input)
- solve_8_2(input)
- solve_9(input, window_size)
- solve_9_1(input)
- solve_9_2(input)
- solve_xx_1(input)
- solve_xx_2(input)
- space
- span(arr, separator)
- tick(state, ray_trace, tolerance)
- tick(map)
- to_i(bits)
-
trees(levels, right, down)
Memory consumption: as big as the input Complexity: O(n/down)
-
twentyTwenty(pair)
find the two entries that sum to 2020
- twentyTwenty2(triple)
- unchecked_fields
- valid_password_sled_rental(entry)
- valid_password_toboggan(entry)
- word
- works?(adapters, target)
Macro Summary
Method Detail
def bounded_int(from, to)
#
Not checking the 4 length criteria, because the numbers al already bound to 4 digic numbers