Pergunta de entrevista da empresa Payoneer

You are given a 2D matrix of integers and an integer k. Write a function that modifies the matrix such that every element in the k-th row or k-th column is replaced with the value k.