Solution for Problem 4:
#includeiostream
#define size 10 //size = sizeof(arr);
#define max 8 //max = maxof(arr[])+1;
using namespace std;
int main()
{
int arr[] = {2,4,6,4,6,3,5,1,5,7}, hasharr[max] = {0}, i, sum=8;
for(i=0; isize; i++)
hasharr[arr[i]] = 1;
Problem 1: Remove duplicate elements from an unsorted array of size N
Problem 2: Find intersection of K unsorted array of N elements each.
Intersection consists of elements that appear in all the K arrays.
Problem 3: How to make a linked list support operations in O(1) time. The
operations on
problem 4.. good question...
With regards,
Praveen Raj
DCE-IT 3rd yr
735993
praveen0...@gmail.com
On Tue, Oct 25, 2011 at 5:57 PM, kumar raja rajkumar.cs...@gmail.comwrote:
Problem 1: Remove duplicate elements from an unsorted array of size N
Problem 2: Find intersection of K unsorted
First of Happy Diwali 2 all.
For question number 4, this can be done by using a chained hashing
technique along with a valid/invalid bit which wil say it has been
processed or not..
After insertion has been done in the hash table. For finding the unique pairs ..
Iterate over the elements
On 10/26/11, SAMM somnath.nit...@gmail.com wrote:
First of Happy Diwali 2 all.
For question number 4, this can be done by using a chained hashing
technique along with a valid/invalid bit which wil say it has been
processed or not..
After insertion has been done in the hash table. For
Hi,
For some time now I started studying Algos and Data Structures. I got
these question when I was going through Hashing. Please help me
answering them. Some questions are of the type to validate my
understanding.
1) Suppose If I need to design a commonly referred Hash table, I
should allow