Ad
  • Custom User Avatar

    more efficient and has better methods when working with integers

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Good job on solving this problem. I am not the best at algorithms or big o notation but I would suggest in the future maybe thinking of ways to structure your data and how you plan on looping through it. I am not a wizard at Regex; so my thought process was to sort smileys between the ones that have a nose and the ones who do not then out of those have smileys that are "winking" in the begging half of the array and the ones that arent in the second half. This way when I am looping through the main arr I can control what array and which portion I am looping through in order to find the best potential match. This saves me from looping through the all possible matches each time to possible not find any. This allows me to return false if I dont come up with a match from my list of best potential matches and I only have to loop through <= 4 possible matches instead of all 12 for every element in the arr array. I hope that made sense please feel free to look at my solution if not.

  • Custom User Avatar

    Thanks a lot for this comment. really helped me to find the issue after busting my head for hours.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    if you are using js or ts java and want to debug your failed test you can add a console.log() or for java System.out.println(); statement and it will print the logs when you run attempt. Note: without adding a conditional you will get all the logs for the each test. Therefore, if you want to debug for a particular year I would recommend adding an if condition to print only the logs for year in question.