Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • \$\begingroup\$ I get James_pic.c: In function ‘readAll’: James_pic.c:67:28: warning: comparison of distinct pointer types lacks a cast [enabled by default] if (currentElement == &(currentRow.a)) currentElement = &(currentRow.b); \$\endgroup\$ Commented May 12, 2014 at 18:35
  • \$\begingroup\$ I get very slightly different outputs from your scala and C code. In fact only one line is different. I just did diff <(sort -n James_pic-c.out) <(sort -n James_pic-scala.out) \$\endgroup\$ Commented May 12, 2014 at 18:49
  • \$\begingroup\$ This will fail for inputs in which a given a value occurs n times where n >= BUFFER_SIZE + 2 \$\endgroup\$ Commented May 12, 2014 at 19:28
  • \$\begingroup\$ I think it's just that you have <=100 in this code and < 100 in the scale code. \$\endgroup\$ Commented May 12, 2014 at 19:54
  • \$\begingroup\$ @Lembik I think you're right. Those darned off-by-one errors! \$\endgroup\$ Commented May 13, 2014 at 9:37