Tutor profile: Abel M.
Questions
Subject: Indonesian
How would you introduce yourself properly in Indonesian?
Halo, apa kabar? (Hello, how are you?) Nama saya Abel. (My name is Abel) Saya akan membantu anda belajar Bahasa Indonesia. (I will help you to learn Indonesian)
Subject: C++ Programming
How do I remove duplicate members in a sorted array? What about unsorted array?
Explanation: The simplest way is to create a new empty array, and fill the array with unique members from the original array. However, this solution consumes some space in the memory, this is what we called as memory complexity. Code: #include<iostream> using namespace std; int removeDuplicates(int arr[], int n) { if (n==0 || n==1) return n; int temp[n]; int j = 0; for (int i=0; i<n-1; i++) if (arr[i] != arr[i+1]) temp[j++] = arr[i]; temp[j++] = arr[n-1]; for (int i=0; i<j; i++) arr[i] = temp[i]; return j; }
Subject: C Sharp Programming
What are hashCode and GetHashCode() and is it possible for two unequal object to have two equal hash codes?
A hash code is a numeric value that is used to identify an object during equality testing. It can also serve as an index for an object in a collection. The GetHashCode() method is suitable for use in hashing algorithms and data structures such as a hash table. Although unlikely, two unequal objects are not guaranteed to have unequal hashcodes . This is what we called as a collision.
Contact tutor
needs and Abel will reply soon.