Problem Inspired by Project Euler 14: Longest Collatz Sequence “Which starting number, under one million, produces the longest Collatz Sequence […]

# Tag: memory-optimization

## Pulling data from API, Allowed memory exhausted

Problem I’m working on a project where I pull data (JSON) from an API. I would like to manipulate this […]

## Writing a more Pythonic solution to the min triangle path

Problem The problem I’m referring to is available here. In quick summary, the problem gives a list of lists such […]

## Updating number of votes with a “Like” button

Problem I have a “Like” button in my iOS app that updates the votes every time it’s tapped. Just like […]

## Permutation of objects, increase maximum limit

Problem I am using this function to find all permutation of objects of a given length. However, right now, the […]

## Optimizing variable order Markov Chain Implementation

Problem I’ve created a variable order Markov chain built on top of a tree, but I can’t train on datasets […]

## Grouping items in a list into inner lists

Problem I have a function that looks up in a list the elements which share same values in order to […]

## Discount calculations on customer purchases

Problem import java.text.DecimalFormat; import java.util.Scanner; class Calculations { //global declarations private static final DecimalFormat tspaces = new DecimalFormat(“0.00”); double totalamt; […]

## Trie structure using Hash in Ruby

Problem This is a follow-up to Boggle board solver in Ruby class Trie < Hash def build(string) string << ‘.’ […]

## SPOJ Adding Reversed Numbers

Problem Recently, I was taking up this challenge and choose my favorite language ‘Ruby’ to do it. My following solution […]

- 1
- 2