Matrix multiplication using nested loops

InterviewQs

Matrix multiplication using nested loops

Python Data Structures Algorithms Matrix Multiplication

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Write a function that will feed in two matrices of size M x N, multiply them together, and return the output as a matrix. For example:

    

# Given the following

# 3x3 matrix

X = [[1,2,7],

[3,9,6],

[3,2,5]]

# 3x4 matrix

Y = [[2,3,6,7],

[2,4,3,0],

[1,2,5,8]]

# Your code should return...

[13, 25, 47, 63]

[30, 57, 75, 69]

[15, 27, 49, 61]

Solution will be written in Python for premium users.


 

You’ve accumulated 367 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Key phrases

Older messages

Evaluating lottery system

Wednesday, November 2, 2022

Statistics, Hypergeometric Distribution, Probability, InterviewQs Evaluating lottery system Statistics Hypergeometric Distribution Probability Forward this email to a friend or colleague and challenge

Highest performing students by college program

Monday, October 31, 2022

SQL, Database Querying, Subquery, Case Statement, InterviewQs Highest performing students by college program SQL Database Querying Subquery Case Statement Forward this email to a friend or colleague

Multicollinearity in linear regression

Friday, October 28, 2022

Statistics, Regression, Multicollinearity, PCA, InterviewQs Multicollinearity in linear regression Statistics Regression Multicollinearity PCA Forward this email to a friend or colleague and challenge

First recurring character

Wednesday, October 26, 2022

Python, Algorithms, Sets, InterviewQs First recurring character Python Algorithms Sets Forward this email to a friend or colleague and challenge them to solve it. Hi, Write a function that returns the

Staffing for hospital births

Monday, October 24, 2022

Statistics, Probability Theory, Poisson Distribution, InterviewQs Staffing for hospital births Statistics Probability Theory Poisson Distribution Forward this email to a friend or colleague and

You Might Also Like

Hacker Newsletter #697

Friday, April 26, 2024

Don't watch the clock; do what it does. Keep going. //Sam Levenson hackernewsletter Issue #697 // 2024-04-26 // View in your browser #Favorites Lattice is the AI-powered people platform that

TikTok threatens shutdown 📱, FCC passes net neutrality 🌐, the robotics renaissance 🤖

Friday, April 26, 2024

ByteDance would rather shut down TikTok than sell the company Sign Up |Advertise|View Online TLDR Together With Plaid TLDR 2024-04-26 6 fintech predictions you need to know for 2024 (Sponsor)

📧 What's inside MMA and how it can help you

Friday, April 26, 2024

What's Inside Modular Monolith Architecture? Hey there! 👋 I wish you an excellent end to the week. What better way to spend the weekend than diving headfirst into a 12+ hour course? Well, maybe

Data Science Weekly - Issue 544

Friday, April 26, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Develop highly relevant search applications using AI

Friday, April 26, 2024

New Elasticsearch and AI training ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect A world of AI possibilities door-test 2.png Explore

Stripe makes more changes

Thursday, April 25, 2024

TikTok is in trouble, and net neutrality is back View this email online in your browser By Christine Hall Thursday, April 25, 2024 Welcome back to TechCrunch PM, your home for all things startups,

💎 Issue 414 - From a Lorry Driver to Ruby on Rails Developer at 38

Thursday, April 25, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 414 - JavaScript Features That Most Developers Don’t Know

Thursday, April 25, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular Node.js news, articles and

💻 Issue 407 - The Performance Impact of C++'s `final` Keyword

Thursday, April 25, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 407 Release Date Apr 25, 2024 Your weekly report of the most popular .NET news, articles and projects

💻 Issue 414 - Everyone Has JavaScript, Right?

Thursday, April 25, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular JavaScript news, articles