Skip to content

Instantly share code, notes, and snippets.

View crashtech's full-sized avatar
🛰️
Creating magic method by method

Carlos Silva crashtech

🛰️
Creating magic method by method
View GitHub Profile
# This is the PEG-based grammar for GraphQL based on:
# https://spec.graphql.org/October2021/#sec-Document-Syntax
#
# It is also inspired by another PEG grammar of GraphQL for JavaScript:
# https://github.com/madjam002/graphqlite/blob/master/grammar.pegjs
#
# This only complies with the GraphQL spec with no further additions, focusing
# only the **Executable Definitions**, to optimize the output and processing
grammar Rails.GraphQL.Parser

Math Code Challange

Written for BSIT 330: Discrete Mathematics (Westcliff University), on April 25, 2021
Reviwed on September 22, 2024

As a common practice, developers are requested to complete code challenges to assess their knowledge of a specific language or prove a certain level of experience in logical conundrums. Usually, such tests ask the programmer to receive a specific input and provide an output based on a series of criteria. Sometimes, the expected solution has to be elegant, be aware of edge cases, and work relatively fast given heavier inputs. However, there are cases that the best solution could be found using a comprehensive understanding of mathematics or other subjects. That is undoubtedly the case of the challenge that is going to be presented in this paper.