The fourth version of the algorithm calls the ALGS4 library in Linux

Source: Internet
Author: User
Tags create directory

One: Build the Java environment:

Confirmed version: 1.8 and above

javac-versionJavac 1.8.0_111

java-versionjava Version "1.8.0_111" Java (tm) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot (tm) 64- Bit Server VM (build 25.111-b14, Mixed mode)

Two

  • Create directory   /usr/local/algs4 .
     [username:~/]  cd/usr/local  [username:/usr/local]  sudo mkdir algs4  [Username:/usr/local]
         sudo chmod 755 algs4  
    enters the subdirectory   /usr/local/algs4 .
     [username:/usr/local]  cd ALGS4  [Username:/usr/loc AL/ALGS4]  pwd /usr/local/algs4 

     

  • Downloads  algs4.jar  (includes javac-algs4  and JAVA-ALGS4).
     [username:/usr/local/algs4]  sudo wget http://algs4.cs.pri Nceton.edu/code/algs4.jar  [USERNAME:/USR/LOCAL/ALGS4]  sudo wget http://algs4.cs.princeton.edu/ LINUX/JAVAC-ALGS4  [USERNAME:/USR/LOCAL/ALGS4]  sudo wget http://algs4.cs.princeton.edu/linux/ JAVA-ALGS4  [USERNAME:/USR/LOCAL/ALGS4]  sudo chmod 755 javac-algs4 java-algs4  [username:/usr /LOCAL/ALGS4]  sudo mv javac-algs4/usr/local/bin  [USERNAME:/USR/LOCAL/ALGS4]  sudo mv Java-algs4/usr/local/bin  

     

  • Check if the installation is successful
    JAVA-ALGS4 Edu.princeton.cs.algs4.StdDraw JAVA-ALGS4 Edu.princeton.cs.algs4.StdAudio [Plays A Major scale]

Reference:

http://algs4.cs.princeton.edu/linux/

The fourth version of the algorithm calls the ALGS4 library in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.