All Questions
13 questions
3
votes
0
answers
311
views
LeetCode: Stone Game C#
https://leetcode.com/problems/stone-game/
Alex and Lee play a game with piles of stones. There are an even
number of piles arranged in a row, and each pile has a positive
integer number of stones ...
7
votes
2
answers
1k
views
Letter Combinations of a phone number using a Dictionary
Problem statement (online source)
Given a digit string, return all possible letter combinations that the
number could represent.
A mapping of digit to letters (just like on the telephone ...
5
votes
2
answers
183
views
Code Challenge: basic arithmic operations using only incrementation operator
Challenge
Write a function that takes 2 integer operands left and right
(both >= 0) and evaluates one of the following ...
2
votes
3
answers
904
views
Leetcode #91 - Number of ways to decode a string
I'm working on problem 91 on Leetcode.com called Decode Ways and I've successfully managed to get a working recursive solution but it results in Time Limited ...
5
votes
2
answers
1k
views
Finding all possible letter combinations from an inputted phone number
Prompt:
Given a string containing digits from 2-9 inclusive, return all
possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the ...
6
votes
2
answers
5k
views
Method to remove outliers from a set of values
I'm removing outliers from a set of data using the method described here.
The method removes the outliers and returns the quartile values of the set after all outliers have been removed.
(...
6
votes
3
answers
739
views
Recursive function challenge
Problem statement
Given a list of float numbers, and four operators +, -, *, / with flat preference, find the maximum value by inserting operator between each consecutive pair of numbers.
For ...
8
votes
1
answer
157
views
AoC Day 24 2017: Electromagnetic Moat
This year's AoC has a puzzle for day 24 that was (supposedly) intended to be solved with recursion.
Here is the description:
--- Day 24: Electromagnetic Moat ---
The CPU itself is a large, ...
3
votes
1
answer
840
views
Ternary tree preoder traversal (recursive implementation)
Problem statement:
Print out to console the ternary tree preorder traversal. Suppose that the tree can have at most 3 children, left, middle and right. Preorder traversal is to visit the middle ...
1
vote
0
answers
894
views
Hackerrank > Woman's CodeSprint 2 > stone division, Revisited ( recursive function)
Problem statement
You have a pile of n stones that you want to split into multiple piles, as well as a set, S, of ...
2
votes
0
answers
564
views
HackerRank university codesprint array construction
Problem statement
Professor GukiZ has hobby — constructing different arrays. His best
student, Nenad, gave him the following task that he just can't manage
to solve:
Construct an \$n\$-...
3
votes
0
answers
410
views
CodeEval - Lucky Tickets challenge
This a solution to the CodeEval's challenge "Lucky Tickets".
After a failed attempt with brute-force calculations (no surprise here), I have tried to implement an algorithm that I found on ...
2
votes
3
answers
456
views
Project Euler 28: sum of spiral diagonals using recursion
I've solved Project Euler #28 using recursion.
If this 5 × 5 spiral pattern is extended to 1001 × 1001, what would be the sum of the red diagonals?
$$\begin{matrix}
\color{red}{21} & 22 &...