Churmura - churmura.com - itucu
General Information:
Latest News:
C Programming source code for checking bit, setting bit and flipping the bit 20 Jul 2013 | 03:44 pm
Some times its very useful to work on individual bits rather than on bytes. I am providing 3 functions to check the bit, set the bit and Flip the bit. 1. checking the bit : Binary AND operation retur...
C programming source code to find and remove cycle in a linked list 19 Jul 2013 | 08:05 pm
In singly linked list, last node’s next link should be null. But it may happen that last node is pointing to in between some node, such that a cycle is present. Problem : Find if there is cycle pre...
C++ Source code for String Replace : replacing a character with sequence of characters 17 Jul 2013 | 10:24 am
Problem: find a give character to replace in the source string and replace that character with given string or sequence of characters. Ex. ” I am a programmer” – Replace every occurrence of ” ” (spac...
C++ programming source code to generate permutations of string 16 Jul 2013 | 09:38 am
Problem: Write a recursive program in C++ to generate permutations of a string. Ex. “abc” -> abc acb bac bca cab cba Logic: “a” -> “ab” -> ab ba Similarly “abc” -> can be generated by inserting the ...
C Programming source code for reversing the string In-Place 12 Jul 2013 | 06:01 pm
Problem : Reverse a string in-place. Given a char string containing ”String” should, changed into ”gnirtS” after reversal. You should not use temporary buffer/string to hold new string. Solution : ...
How to find if a string is a permutation of another string 12 Jul 2013 | 05:48 pm
This algorithm will count the charterer’s appearance in both the strings. Comparing the count will give tell if its permutation or not. Can be made more efficient in terms of processing and storage, ...
Source code for Quicksort algorithm in C programming 12 Jul 2013 | 05:39 pm
Quick sort is the one of the most efficient method to sort the elements. 1. Select a pivot element. 2. Partition the array around pivot 3. Move the elements such that all elements less than partition...
Write an algorithm to check if string has duplicate characters 11 Jul 2013 | 01:08 pm
Problem: In a given string, find out if all character’s are unique or they are repeated more than once. Solution : There are numerous ways to implement this. I am providing four different algorithms t...
Stock tips and the truth – easiest way to Trap small investors 26 Jun 2013 | 06:44 am
Recently I come across a stock report showing the details of some of the stock’s which had grown 500% to 5000% over 5 to 10 years horizon. On cross checking the data, it’s true. For ex. An Infosys st...
Synchronization in win32 / MFC and Difference between critical sections, mutex and semophore objects 26 Jun 2013 | 06:41 am
By multi threading many things can be done at once. One can divide a single task into multiple parts and execute simultaneously. More than one thread running simultaneously. On single processor system...