Today I'd like to mention about search engines and their design criterias. Yes we have Google, Bing, Yahoo, Duckduckgo, yandex and many more. But is it easy to build a search engine? The answer is clearly NO. If you think that you can easily build a search engine you're more like you're comparing a Ferrari … Continue reading Building a Search Engine

# Author: hi

# “rsync” a Versatile Tool

I should mention about a tool that deserves to be described specifically - rsync. This tool is well known by system administrators but not as much by home users. But this tool has promising capabilities for them as well. If you're a backup lover like me (your photos, documents and etc.) and if you're doing … Continue reading “rsync” a Versatile Tool

# Price List Application (Flask, SQLAlchemy, pyQT4)

My elder brother needed an application to manage price lists of his wholesalers and dealers. Products' prices that he is following are subject to change daily because exchange rates may change daily and it may be very hard to find optimal price for a product if it can be obtained from multiple dealers. So I decided to help … Continue reading Price List Application (Flask, SQLAlchemy, pyQT4)

# Android Run on Device is shown OFFLINE

If you tried to run your android app on your device and android studio shows that device off-line there are some reasons: You may be using and USB3.0 port, move it to USB2.0 Your USB cable may have some problems, change it Restart phone, adb etc. First option solved mine.

# Greatest Common Divisor (GCD) of Big Numbers – A Recursive Approach (C++)

In this post I will provide mathematical background and C++ implementation of greatest common divisor (GCD) calculation of big numbers problem. Problem can be described as: You have two numbers to calculate their GCD. First number is very big, let say 250 digits long. Other number is not so long, maybe less than 6 digits. How … Continue reading Greatest Common Divisor (GCD) of Big Numbers – A Recursive Approach (C++)

# Selection Sort

Selection sort finds minimum element of the unsorted elements and swaps it with the first element of unsorted part. It continues with the rest of the unsorted elements with this manner. Below is the implementation of selection sort. Note its worst case is O(n^2). #include <iostream> using namespace std; int find_min(int* arr, size_t size, int … Continue reading Selection Sort

# Merge Sort

Merge sort is a divide and conquer based algorithm. Its merge behavior names the algorithm. Algorithm details can be found elsewhere but I'll give my basic merge-sort implementation here. It starts with dividing the array into two equal sized arrays. Division done until each array only holds an element. But merging procedure is the interesting … Continue reading Merge Sort

# Quick Sort

Quick sort is a divide and conquer based algorithm like merge sort. I provide my implementation of quick sort which is implemented recursively. #include <iostream> #include <cstring> using namespace std; void display(int* arr, size_t size) { for (int i = 0; i < size; ++i) { cout << arr[i] << endl; } } int partition(int … Continue reading Quick Sort

# Breath First Search & Depth First Search

Breath First Search and Depth First Search are two graph traversal algorithm to search graph items. I provide my implementation for both methods. Code is self explanatory. I also provided a simple graph implementation. #include <iostream> #include <vector> #include <algorithm> #include <stack> #include <queue> using namespace std; struct Vertex { char name; int number; Vertex(): … Continue reading Breath First Search & Depth First Search

# Finding The Half Of Linked List in Single Traversal

This is like a puzzle question: you iterate the list but at the end of the iteration (i.e. when you reach the end of linked list) you should display the half. The question seams hard because you do not know how many node exist in the list. So, how you find the half when you … Continue reading Finding The Half Of Linked List in Single Traversal