# Tutor profile: Shubham G.

## Questions

### Subject: Python Programming

Write a python program to find the sum of all the digits in any given integer N.

def findSum(n): if (n < 10): return n last_digit = n % 10 return last_digit + findSum(n//10) (Assume appropriate indentation for the code above)

### Subject: Linear Algebra

Describe how elementary row operations affect the determinant of matrices. Elementary row operations include swapping rows, scaling rows, and adding/subtracting one row onto another.

Swapping rows negates the determinant, scaling rows by a factor k scales the determinant by a factor k, adding/subtracting rows with one another does not affect the determinant.

### Subject: Java Programming

What would be an efficient way to find the median of an array of numbers? Describe the process thoroughly and support it with code.

The most efficient way to find the median of an array would be to sort the array and index into the middle element. Using the built in sort method of the array class then finding the element at the index array.length/2. Supporting Code is provided below: public int findMedian(int[] array) { int middle = array.length/2; int[] sortedArray = Arrays.sort(array); return sortedArray[middle]; }

## Contact tutor

needs and Shubham will reply soon.