Top new questions this week:
|
Problem:
I have seen a few questions around hangman. Usually this is done in a very hackish way, which usually can not be generalized any further. My thought or question is about the creation of the ...
|
This is a very rudimentary lolcats translator (it only works on the phrase "Can I have a cheeseburger") in Haskell. This is my first ever attempt at Haskell (or any functional programming language). I ...
|
This is a code to merge two sorted linked lists. l1, and l2 are sorted. While calling the merge function via l3, I am passing l3 as a object by referance in that function. Code is running fine, but ...
|
This is an "entry" I made for the June 2016 Community Challenge to make a Chutes and Ladders generator. It generates a random number of chutes and ladders with a total delta of -50 and displays their ...
|
I was wondering if anyone has any suggestions to improve my code. The code works perfectly fine for me (compiled it in BlueJ and Eclipse) but I was wondering what other more experienced programmers ...
|
I am trying to create a simple Hangman game. The game has an edit mode for first run in which the user has to supply 6 unique words. The game starts by shuffling words, then for every turn, it selects ...
|
Just checking if I could still do it:
#include <iostream>
#include <algorithm>
std::size_t getParent(std::size_t n)
{
return (n - 1) / 2;
}
template<typename I>
void heapify(I ...
|
Greatest hits from previous weeks:
|
I have made a basic calculator using methods. This is my first attempt at using methods and would like to see if I can improve on this as there is a lot of repeated code.
import java.util.Scanner;
...
|
I am trying a stack implementation using an array. I want to know if this approach is OK or if there is a logical problem. This program is working fine.
#include <stdio.h>
#define MAXSIZE 5
...
|
Can you answer these?
|
I was wondering if someone could quickly skim over this for me really quickly and tell me if there's anything I could improve code-wise. What I have right now seems pretty big and clustered, and I'm ...
|
I have a function for applying gravity forces between every possible pair of bodies on my game. It is the most used function, and can run more than 100k times per frame so every minor improvement on ...
|
I have written a script that checks if data is known in memcached, and if not it queries it from the mysql db and stores it.
I would appreciate any inputs if i have done this the "correct" way, since ...
|