[Solved] SQL Database Algorithm

Even though this question is Way too broad, and actually not asking anything, i’ll give it a few minutes of attention. 1) You backup the current state and work on a Sandbox! 2) if your only need is few reports, i guess you can generate them query the different databases independently and maybe post processing … Read more

[Solved] How to solve this mathematical equation in php [closed]

Just group the D’s first and dont hardcode the indices, use $i $S = array(); $D = array(); $M = array(“1″=>30,”2″=>31,”3″=>30); $Y = array(“1″=>360,”2″=>360,”3″=>360); $O = 30000; $P = 0.3; $N = 10509.74; for($i = 1, $size = count($M); $i <= $size; $i++){ $final_D = 0; // group the D’s first (O-D1), (O-D1-D2), … and … Read more

[Solved] A program which is difficult

Essentially, your question is this: given a graph with nodes represented as indices and edges as index pairs, and given an index i that represents a node, find all nodes which are connected to the given node. UnionFind algorithm to find connected components over nodes with indices: Initialize an array father of size number of … Read more