UVa: 941 (Permutations)


Advertisements

Learn Swift by comparison (Part – 1)


Swift IDE If you do not have access to a Mac then try these online IDE to run swift. http://www.runswiftlang.com http://swiftstub.com Both are free. Playground If you are using Xcode 6.x+ then you have a playground to learn swift. You can play around with swift in the playground and learn it. Playground runs code instantly … Continue reading Learn Swift by comparison (Part – 1)

Using C++11 with Eclipse in Mac Yosemite


I am using Eclipse Luna SR1a (4.4.1) and assuming you can install and run Eclipse C++11 Download gcc-5.0-bin.tar.gz from http://hpc.sourceforge.net Unzip the file You will get a usr folder and the folder structure will be following usr ▸ local ▸ bin usr ▸ local ▸ include usr ▸ local ▸ lib usr ▸ local ▸ … Continue reading Using C++11 with Eclipse in Mac Yosemite

Cocos2d-x: Version 3.x Example code snippets


Scale the background image to fill the Screen Add a close button to exit the application Touch Detection (Touch Began, Touch Moved, Touch Ended) HelloWorldScene.h HelloWorldScene.cpp Create a Sprite to the touch Location follow the Touch Detection (Touch Began, Touch Moved, Touch Ended) HelloWorldScene.cpp Accelerate a sprite with device acceleration HelloWorldScene.h HelloWorldScene.cpp Accelerate a sprite … Continue reading Cocos2d-x: Version 3.x Example code snippets

Fibonacci number: Python and C program execution time comparison


Problem: What is the first term in the Fibonacci sequence to contain 1000 digits? Solution with C/C++ Execution time: 0.083 seconds Solution with Python Execution time: 0.188 seconds Lets go to the next level Problem: What is the first term in the Fibonacci sequence to contain 10000 digits? Solution with C/C++ Execution time: 6.986 seconds … Continue reading Fibonacci number: Python and C program execution time comparison