Skip to content

Algorithms and data structures implemented across different languages.

Notifications You must be signed in to change notification settings

darqueos/data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms & Data Structures

This repository was created after I found myself in the need of data structure knowledge for my graduation class. It helped me practing what I already knew and even learning different aspects of all the programming languages I am most excited for.

Contribution

I mainly push code here for later reference, but you can also fork and create pull requests for anything you deem worthy of. Any feedback is much appreciated. You can find me here (DMs are open).

Playground

You should be able to run any file directly from the command line. Follow the instructions for each programming language below.

Python

The entry language to most Computer Sciences courses, I find Python to be the most readable language. I value it for its relevance in data science and machine learning.

At the time of writing, 3.6.2 was the latest version. Although other versions may be compatible, you're better suited installing this one.

$ python -V
Python 3.6.2

Run any Python file with the command:

$ python Python/<file>.py

JavaScript

A scripting language that has become the most popular tool for frontend development and since the release of Node.js, the backend too.

Requirements

It's recommended to run it on Node version 8+.

$ nvm install v8.7.0
$ node -v
v8.7.0

You should be able to run any file from most browser's console or from the command line:

$ node JavaScript/<file>.js

Testing

To test JavaScript files navigate to the corresponding folder and install the dependencies:

$ cd JavaScript && npm i

For testing we're using Jest, simply run:

$ npm test

Swift

After showing close to 30 years of dominance as the programming language for macOS, Apple unveiled an entire new language to the world. It would not only become the default language for developing apps across its devices, but I was open-sourced.

Swift files can be run on macOS and Ubuntu command line:

$ swift -v
Apple Swift version 4.0

$ swift Swift/<file>.swift

Kotlin

Kotlin got under the spotlights after Google conceiving it a main class citizen language status for developing Android apps. From the company that created InteliJ IDE, this is a multi-purpose language, able to transpile code to JavaScript, run on the JVM or even run on it own.

Running Kotlin directly from the command line is a bit tricky, since you have to compile it to Java first:

$ kotlinc -version
info: kotlinc-jvm 1.1.51 (JRE 1.8.0_144-b01)

$ kotlinc Kotlin/<file>.kt -include-runtime -d Kotlin/<file>.jar

This will generate a .jar file, which you can execute by typing:

$ java -jar Kotlin/<file>.jar

Go

This Google creation caught the developer attention in the recent years after numerous impressive results in benchmarks. A really concise language, with its own linting built-in. As a practial example of application written on Go, you can check out Docker.

Go is a weird language. Weird as in very different from your typical OOP language. All Go code here is basically useless, and function more as a boilerplate or a template than some code you can copy, paste and go. At the time of writing, Go latest stable version is 1.9. It has no generics implementation, which data structure code make heavy use of.

Although you can't directly run files from a command line, you can try using any online Go REPL.

About

Algorithms and data structures implemented across different languages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published