Community Profile

# Abhishek Sharma

##### Last seen: Today
126 total contributions since 2021

View details...

Contributions in
View by

Solved

Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

12 hours ago

Solved

Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

14 hours ago

Solved

Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

3 days ago

Solved

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

3 days ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

4 days ago

Solved

Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

5 days ago

Solved

Draw a '0' in a one matrix!

10 days ago

Solved

calculate the length of matrix
input 1 array, calculate the length

10 days ago

Solved

Double all elements in the array
Duplicate all elements in the array

10 days ago

Solved

the average value of the elements
Calculate the average value of the elements in the array

10 days ago

Solved

to the 2 all elements
to the 2 all elements

10 days ago

Solved

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

10 days ago

Solved

Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

10 days ago

Solved

Find the max element of the array
Find the max element of the array

10 days ago

Solved

Converts numbers into characters
Converts numbers into characters

10 days ago

Solved

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

10 days ago

Solved

Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

10 days ago

Solved

Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

12 days ago

Solved

The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

13 days ago

Solved

Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

13 days ago

Solved

Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

13 days ago

Solved

Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

13 days ago

Solved

Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

13 days ago

Solved

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

14 days ago

Solved

Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

14 days ago

Solved

MATLAB Basic: rounding IV

14 days ago

Solved

MATLAB Basic: rounding III

14 days ago

Solved

MATLAB Basic: rounding II

14 days ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

14 days ago

Solved

Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

14 days ago