Tag Archives: C++

Puzzle – Easy : C++ Multithreading

Below is a small and easy puzzle on multi-threading, ideal for beginners. And to be honest, title should have been “C Multithreading” since it uses pthreads, and not C++11 for threading. So what would be the output? In what order … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Some important GCC flags

GCC is a well known compiler for a number of languages. Here I will list and describe some important flags used with GCC, relevant for C and C++. -o This is used to set the output file. Notice that it … Continue reading

Posted in Programming | Tagged , | Leave a comment

Edit Distance using Dynamic Programming

Edit Distance is quite a interesting and popular problem. Here I present an efficient bottom up C++ program to solve it. Problem – We are given 2 strings. We have to find the “edit distance” or the cost of converting … Continue reading

Posted in Algorithm, Programming | Tagged , | 10 Comments

Merge Sort program in C

It is rather amazing, that many programmers are unable to write ‘Merge Sort’ correctly. With its guarantee of O(n log n) time complexity, it is a dependable sorting algorithm. Also it can be used to count number of inversions in an array … Continue reading

Posted in Programming | Tagged , , | 27 Comments

Time Comparison of Quick Sort, Insertion Sort and Bubble Sort

Comparing different sorting algorithms for time performance has always been amusing. It has been done tons of time. But you should try it out for yourself. Apart from fun, this comparison is very useful in real life. Companies and organisations … Continue reading

Posted in Algorithm, Programming | Tagged , , , , , , | 20 Comments

C++ Programming in Linux

Posted in Programming, Video | Tagged , | Leave a comment

Custom Programmes for editing large files

People sometimes need to edit a large file. I do it time and again. While Word Processors and Spread sheets can do it for you in seconds, sometime these software just can’t do it. For instance how would you pick … Continue reading

Posted in Programming | Tagged , | Leave a comment