All Questions
Tagged with project-euler or programming-challenge
3,393 questions
2 votes
3 answers
1k views
LeetCode 3542: Minimum Operations to Convert All Elements to Zero
I am working on this LeetCode problem where I have to count the minimum number of operations to make all elements in an array equal to zero 3542. Minimum Operations to Convert All Elements to Zero ...
5 votes
5 answers
1k views
Check whether a binary tree is symmetric
I implemented a recursive solution that compares the left and right subtree in mirrored fashion. It works for my test cases, but I would like to know if there are any best practices that would make ...
4 votes
3 answers
452 views
FOLLOW-UP to the Strength of a Pyramid Top post with a revised code example
As a follow-up to my previous question, I've decided to post a follow-up question with a revised code that accommodates most of the inputs from the previous question's comments, namely: Used ...
7 votes
4 answers
1k views
Project Euler #909: L-Expressions I
I am trying to solve the 909th challenge of Project Euler. It is basically about replacing specific patterns in a string until no pattern is found. A given string like ...
3 votes
2 answers
249 views
Third way to place queens and rooks with the higher score (extension of the queen problem)
Here is a third implementation, the second is in my question Place queens and rooks with the higher score (extension of the queen problem) and an initial one is in my answer for the question N queen ...
5 votes
3 answers
1k views
Project Euler Problem #1: Multiples of 3 or 5
Project Euler Problem #1 Multiples of 3 or 5 states: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of ...
6 votes
2 answers
732 views
Weather Observation Station 8 query
Here's my (correct) solution to a HackerRank question: Weather Observation Station 8 Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last ...
1 vote
1 answer
177 views
FreeCodeCamp todo list
I'm writing JS for the FreeCodeCamp todo list; the corresponding HTML and CSS for this can be found on their page. I have made one edit to the HTML - the button with type "submit" has been ...