MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodaySearch Solutions

What is Size?

Size refers to the number of nodes in a parse tree. Generally speaking, you can think of size as code length.

1 – 39 of 39 previous next

180Size

0 Comments

180Size

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

672Size

0 Comments

178Size

0 Comments

298Size

0 Comments

Incorrect

0 Comments

499Size

0 Comments

Incorrect

0 Comments

221Size

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

627Size

2 Comments

2 Comments

Richard Zapor
on 24 Feb 2013

James, your speed is impacted by recalculating previously evaluated cases. A case of 100 v 100 finished in ??

James
on 26 Feb 2013

You're correct. It is inefficient with super-large armies. I was going for an exact solution (which was an offshoot of the original problems I had with the test suite), and recursion seemed to be the best way to do it.
As our resident "Get this problem to run faster" expert, do you think setting up a global m-by-n matrix with previously calculated probabilities would help things?

112Size

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

125Size

0 Comments

142Size

0 Comments

240Size

0 Comments

256Size

0 Comments

267Size

0 Comments

298Size

0 Comments

343Size

0 Comments

143Size

0 Comments

147Size

0 Comments

147Size

0 Comments

147Size

0 Comments

147Size

0 Comments

143Size

0 Comments

143Size

0 Comments

143Size

0 Comments

143Size

0 Comments

143Size

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

Incorrect

0 Comments

Incorrect

2 Comments

2 Comments

Richard Zapor
on 11 Feb 2013

suggest writing script to produce testsuite of more cases to paste into cody

Jeremy
on 11 Feb 2013

Yes, I am enlarging the test suite. Thanks for the input!

1 – 39 of 39 previous next