The most efficient method to compute dot products of a single vector with row vectors stored in an array.

[2, 4, 1] <dot> [[5, 3, 2], [3, 3, 5], ..., [2, 2, 1]] 


[[2, 4, 1] <dot> [5, 3, 2], [2, 4, 1] <dot> [3, 3, 5], ..., [2, 2, 1] <dot> [2, 4, 1]]

I mostly want to see how it could be done in C and python, but do it in any language of your choosing, even pseudo code.


closed as off-topic by Robert S., Ramillies, Jonathan Frech, Arnauld, AdmBorkBork Feb 7 at 17:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This site is for programming contests and challenges. General programming questions are off-topic here. You may be able to get help on Stack Overflow." – Robert S., Ramillies, Jonathan Frech, AdmBorkBork
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Welcome to PPCG! This site hosts recreational programming challenges that need to have an objective winning criterion. This may be turned into a valid challenge by adding a relevant tag such as fastest-code or fastest-algorithm. Because the task doesn't offer much room for creative solutions, I doubt it would be well received, though. You may find help on cs.stackexchange.com instead. \$\endgroup\$ – Arnauld Feb 7 at 17:36
  • \$\begingroup\$ How can I transfer? \$\endgroup\$ – Can Hicabi Tartanoglu Feb 7 at 19:23