Unanswered Questions
117 questions with no upvoted or accepted answers
6
votes
0
answers
107
views
Chapter 8 Challenge: Add employee names to a department
The boring but exciting challenge:
Using a HashMap and HashSet, create a text interface to allow a user to add employee names ...
5
votes
1
answer
4k
views
Largest rectangle areas after drawing boundaries
I was asked the following question while trying to get a Hackerrank certificate. I couldn't solve on time but I now completed the solution. Can you please check if my solution seems good? Suggestions ...
4
votes
0
answers
165
views
Finding the number of possible paths in a cave system (Python)
I've finally come up with working solution for day 12 of AdventOfCode, where you have to find the number of possible paths in a cave system following a given set of rules (described below). My ...
4
votes
0
answers
216
views
GeekTrust: Traffic problem - functional programming
First attempt to write functional programming, been following OO paradigm all through my programming journey
Please review the code and let me know if any comments and violations of functional ...
4
votes
0
answers
145
views
LeetCode 1632: Rank Transform of a Matrix in Rust
This is a problem-solving code for LeetCode 1632.
Given an \$m \times n\$ matrix, return a new matrix answer where
...
4
votes
0
answers
110
views
Reduce size of minesweeper program to fit in qr code
I saw a guy who fit snake in a qr code and I wanted to do the same thing but with minesweeper. The maximum amount of data a qr code can hold is 3kb. My c program, without any compiler magic, takes up ...
4
votes
0
answers
79
views
Extracting cycles from directed graph with max degree 1 and then performing set cover on cycles
I'm trying to solve P1243E in an efficient manner. The problem in simple words is:
Given \$k\$ boxes, \$i\$-th box with \$n_i\$ numbers. All numbers are distinct. We need to select one number from ...
4
votes
0
answers
858
views
Kadane's algorithms to leetcode "121 Best Time to Buy and Sell Stock"
I employed the conventional Kadane's algorithms to solve a maximum subarray problem in leetcode Best Time to Buy and Sell Stock - LeetCode
Description
Best Time to Buy and Sell Stock
...
4
votes
0
answers
498
views
Two solutions to leetcode 127.wordLadder
I am working on Word Ladder - LeetCode
Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that:...
4
votes
0
answers
404
views
Kattis Ants challenge
I am trying to learn Haskell doing some contest problems. I have worked a bit with the language but still have a very long way ahead.
Right now I am working with a problem called Ants:
An army of ...
4
votes
0
answers
446
views
Cleaning up memory after loading Access DB into a datagrid
I wrote an app that pulls a MS Access DB into a DataTable and then displays it into a WPF datagrid. The dialog window has a search button which calls on a class ...
4
votes
0
answers
1k
views
Memory optimization when finding the Cartesian product in Python
My function gets the Cartesian product of a list of lists of tuples. The function is correctly producing the list of lists, but it's a memory hog (and leads to a MemoryError for large data sets, with ...
4
votes
0
answers
53
views
Texplode KotH controller
I am creating a KotH (King of the Hill) challenge for Programming Puzzles and Code Golf. Other site users will write programs that play Texplode (a version of this game on a square grid). The program ...
4
votes
0
answers
314
views
Advent Of Code 2016 Day 9 Part 1 Solution
This code gives the solution to Part 1 of this question:
http://adventofcode.com/2016/day/9
Summary: You have to find the length of the input string after using the markers to duplicate parts of it. ...
4
votes
0
answers
144
views
Project Euler #14 in Clojure (finding long Collatz sequence chain)
I'm working on a Clojure implementation for Project Euler #14, which asks for the initial element, under 106, that produces the longest collatz-sequence chain. I'm trying to make use of every ...