Category Archives: Programming

Why Python is Not a Good OOP Language

Anonymous

I’ll go against popular opinion. I started with Python. I did all my projects in my Master’s program in Python. However, after graduating, I started working for a company that worked on Microsoft stack. I realized the importance of strongly typed language when it came to writing large applications. I fell for “hey, how simple it is to write hello world program in python” trick. Everything looks nice, and feels better when you write a to-do app. You’ll see the real face of the language when your application grows. I recommend learning python after you have mastered a strongly typed language like Java/C#. There are “recommended” ways to write Python but not enforced upon. Also, I’ve heard learning about types is not a big hurdle for beginners.

BigInteger in Java and C++

code:

for c++ this link link or google search is good but i didn’t found any goood solution yet:
http://codeforces.com/blog/entry/16380

java:

Simple addition:

BigInt Sum:

 

 

Hackerearth Min-Max

code:

partially accepted code with vector:

 

C++ Vector push_back()…pop_back()

Algo – Linked List

Best Video Explained:

code:

some bugs  here but understood the implementation:

 

Algorithm: Euler’s GCD


code:

more optimized:

 

Recursive:

 

http://www.progkriya.org/gyan/basic-number-theory.html#section3

Algo: Prime factorization of a number

code:

I/O:

 

Prime Number: Trial division | Prime check upto N in C

code:

Help can be find:
http://www.studystreet.com/c-program-print-prime-numbers/
http://www.codingalpha.com/prime-number-c-program/
https://en.wikipedia.org/wiki/Primality_test

Algo DS: Circular Queue

 

code:

C++ STL in Bangla

https://tanvir002700.wordpress.com/2016/04/15/c-stl-tricks1/

 

Data Structure: Queue

Stack VS Queue difference:

 

code:

My implementation:

Another Video:

Code from the video Mycodeschool(Using circular queue):

 

Algorithm: BFS(Breadth First Search)

Theory:

http://scanftree.com/Data_Structure/Breadth-First-Search

Bangla:

গ্রাফ থিওরিতে হাতেখড়ি-৪(ব্রেডথ ফার্স্ট সার্চ)

Video:

code implementation:

Some other links may help:

Breadth First Search Algorithm

code:

Input:

Output:

Another code tried to write from the pseudocode is:

reference from java code: http://www.programmingboss.com/2014/06/breadth-first-search-bfs-in-java.html

ppt slide: https://drive.google.com/file/d/0B0sCkwd_qKgJSzZyUWVYZU5GWlk/edit

Struct Deep Example

code:

struct some other beautiful example:
code:

 

File Handling: Read Content From a Binary File

code:

 

File Handling: Formatted Data Reading and Writing Example

code: