From eebd094da98938a4f8312d3645bc486eda429c2d Mon Sep 17 00:00:00 2001 From: promaroy Date: Tue, 1 Oct 2019 16:21:27 +0530 Subject: [PATCH] added hash_table --- hash_table.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 hash_table.cpp diff --git a/hash_table.cpp b/hash_table.cpp new file mode 100644 index 0000000..26587a2 --- /dev/null +++ b/hash_table.cpp @@ -0,0 +1,25 @@ +// Author: Proma Roy +// GITHUB: https://github.com/promaroy + +// hash table implementation for finding the frequency of each character in a string... + +#include +using namespace std; +int main() +{ + string s="hacktoberfest";//string + int hash[26]={0};// initializing hash table to store the frequency of each character.. + + for(int i=0;i