Hang on...
Distinct Elements
Task
- Create a function distinct(array, length of array) . This distinct() will take two arguments - a dynamic uint type array and length of the array.
- The distinct() will return the number of distinct elements in an array.
For Example -
If array =[4, 2, 3, 4] then distinct() will return 3.
If array =[1, 1, 1] then distinct() will return 1.
Note - Function will be public.
You can do this :)
Adding your container request
Getting your dedicated container
Connecting to your container
Setting up your editor
Finalizing your playground
TerminalEditorBrowser