set up jupyter notebook for R

First install anaconda whatever

https://www.continuum.io/blog/developer/jupyter-and-conda-r

 

in the command window

Once you have conda, you may install “R Essentials” into the current environment:

Bash

or create a new environment just for “R essentials”:

Jupyter

Jupyter provides a great notebook interface to write your analysis and share it with your peers. Open a shell and run this command to start the Jupyter notebook interface in your browser:

Bash

Start a new R notebook:

create an R notebook with jupyter

Algorithms

Algorithms

Simple Array Sum

 

Compare the Triplets

 

Diagonal Difference

Sample Input

Sample Output

 

Explanation

The primary diagonal is:
11
5
-12

Sum across the primary diagonal: 11 + 5 – 12 = 4

The secondary diagonal is:
4
5
10
Sum across the secondary diagonal: 4 + 5 + 10 = 19
Difference: |4 – 19| = 15


 
 staircase

 
Time Conversion

 
 Circular Array Rotation