Giter Site home page Giter Site logo

tokisakikurumi2001 / reversing_number Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 78 KB

Reverse the number by different approaches in many programming languages(that I know)

C 8.12% C# 7.54% C++ 4.23% Haskell 3.40% Haxe 5.85% Java 5.88% JavaScript 5.51% Perl 4.00% Objective-C 18.25% PHP 3.58% Prolog 3.64% Python 2.93% Ruby 2.46% SQLPL 3.38% Swift 3.76% Batchfile 2.48% Dart 4.72% Go 3.47% Julia 2.68% Kotlin 4.13%
polyglot-programming arduino haskell haxe objective-c perl5 php7 python3 ruby batch-script

reversing_number's Introduction

reversing_number

Reverse the number by different approach

Old approach:

Modulo and integer divide to get the number

Advantage:

  • Simple, arithmetic operation required

Disadvantage:

  • Dealing with long number seems to be very hard to achieve

New approach:

Using built-in function:

Convert number to string and use built-in function to reverse the string then return

Advantage:

  • Dealing with big number is a piece of cake

Disadvantage:

  • Some programming language doesn't have built-in reverse string function
  • Require some simple knowledge when dealing with string

Handmade reverse function:

Instead of using built-in function, we implement our own reverse function

Advantage:

  • Like using built-in function

Disadvantage:

  • Dealing string in some low-level programming language may require strong basic CS knowledge

reversing_number's People

Contributors

tokisakikurumi2001 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.