Search
 
SCRIPT & CODE EXAMPLE
 

CPP

hamming c++

int hamming(string a, string b) {
	int d = 0;
	for (int i = 0; i < k; i++) {
		if (a[i] != b[i]) d++;
	}
	return d;//hamming distance between 2 strings a and b
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: dfs in tree using adjacency list 
Cpp :: ue4 c++ bool to text 
Cpp :: Use of Scope Resolution operator for namespace 
Cpp :: c++ abs template 
Cpp :: C++ Single Line Comments 
Cpp :: easy way to encrypt a c++ file line by line 
Cpp :: how to extract a bit from a byte in c++ 
Cpp :: flowchart to display factors of a number 
Cpp :: c++ watch a variable 
Cpp :: deifine an object in C++ 
Cpp :: what is vector capacity in c++ 
Cpp :: inorder to postorder converter online 
Cpp :: Tricky Subset Problem 
Cpp :: how to print std::string 
Cpp :: find the number of digits of a given integer n . 
Cpp :: find largest number in each row in array c++ using function 
Cpp :: convert GLFWwindow* to IntPtr 
Cpp :: cf 633b trivial problem explanation 
Cpp :: read large files part by part in C++ 
Cpp :: how to traverse string like array in cpp 
Cpp :: how to define a node in c++ 
Cpp :: c++ vs c# 
Cpp :: Magical Doors codechef solution in c++ 
Cpp :: C++ Enumeration Type 
Cpp :: e.cpp 
Cpp :: assoc-right antlr 
Cpp :: online compiler cpp 
Cpp :: c++ remove last element from array 
Cpp :: cpp queue 
Cpp :: uses of c++ 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =