[Solved] Java Regular expression for money

Currency amount US & EU (cents optional) Can use US-style 123,456.78 notation and European-style 123.456,78 notation. Optional thousands separators; optional two-digit fraction Match; JGsoft: ^[+-]?[0-9]{1,3}(?:[0-9]*(?:[.,][0-9]{2})?|(?:,[0-9]{3})*(?:\.[0-9]{2})?|(?:\.[0-9]{3})*(?:,[0-9]{2})?)$ Reference: here 2 solved Java Regular expression for money

[Solved] c# logic approach to dispatch efficiency [closed]

If you are allowed to use external libraries (I assume some homework assignment) you should use the Combinatorics library (via NuGet). If not, do the combinatoric stuff yourself 😉 The idea: You need all possible (non repeating) combinations of cars and zones to find the combination(s) that gets the most jobs done. Using Variations from … Read more

[Solved] logic help for smallest/largest value

You need to choose a standard unit of measure. The question suggests meters, so use that (you can use float or double for this, depending on what precision you need). The problem is then simple, create some variables for the sum, smallest seen, and largest seen, the for each new input, convert to the standard … Read more

[Solved] How to divide items equally in 4 boxes? [closed]

Create a function that gets a product weight and returns a bag number – the one which has the least free space that’s still enough to fit. Put it in the bag. Repeat until done. $bags = array(60,80,20,10,80,100,90); $containers = array(1=>100,2=>100,3=>100,4=>100); // number -> free space $placement = array(); rsort($bags); // biggest first – usually … Read more