The logic tag has no wiki summary.
2
votes
1answer
67 views
How can improve the run time of this code?
Here the link of problem for which i need your help.
http://www.codechef.com/JUNE13/problems/COLLECT
I came up with solution and working fine for all cases but it take more time. I need your help in ...
-1
votes
0answers
28 views
How is it called when what goes first in &&-condition(java) matters a lot? [closed]
I have discovered that if accessing some index from array/string happens first in IF clause, it can crash (out of bounds exception)
However, if i check index first and then try to access it, if index ...
3
votes
2answers
52 views
How to avoid goto without replicating code in my meshing algorithm?
To generate faces of a Minecraft-like world from a three dimensional array, I developed the following meshing algorithm. The faces are given vertices and indices. A vertex consists of a position in ...
3
votes
3answers
182 views
Advice on program which calculates scores for predictions of Football scores
I am writing a program which calculates the scores for participants of a small "Football Score Prediction" game.
rules are:
if the match result(win/loss/draw) is predicted correctly: 1 point
if the ...
2
votes
1answer
78 views
Implementing logic in a different way
I need to write a function which will do the following functionalities
I would get a string and a array as input parameters
The string would be like one of the following for example
catalog
...
3
votes
1answer
190 views
Is there better way of writing these IF checks?
This is what I have, But I think I can write it in a sohrter and more efficient way too, what do you suggest?
string actionString= string.Empty;
if (auditAction == ...
3
votes
1answer
142 views
Implementing C++ boolean function objects with logical operator combinations
I want to make a C++ object hierarchy of "classifiers", which can be composed together via logical operators into a single classifier that implements the whole logical combination.
This is actually ...
11
votes
3answers
1k views
Java TicTacToe (logic)
I'm currently studying java by myself,
the book I'm using (while very good)
lacks feedback (obviously), while trying to write this program I found myself solving most of the problems I've encountered ...
3
votes
1answer
116 views
Review logic in shell script
I have a shell script to mount different remote systems. While it does work, the area I struggle with (not being a programmer) is the logic of the script: it feels quite stilted and there seems to be ...
2
votes
2answers
107 views
Filtering logic
I have a FileAsset class. I have a set of 'filters' with which I determine if a FileAsset should be written to my database. Below is a telescoped version of how the filters work now. My big ...