Skip to content

A Ringba algorithm test to be given before employment interviews.

Notifications You must be signed in to change notification settings

Ringba/ringba-code-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Ringba Algorithm Code Test

DO NOT MAKE PUBLIC FORKS OF THIS REPO

Please fill in the implementation of the HighlyOptimizedThreadSafeInMemoryDuplicateCheckService service. This service's only job is keep track in memory if a given id has been seen before.

The service must meet the following specs.

  • Service is in memory and does not persist data
  • Service is thread safe
  • Service is optimized for memory, CPU, and locking
  • Service must handle large datasets
  • Service can not tolerate duplicates but can tolerate false positives with an error rate equal or less than 1%
  • Service will not utilize any third-party libraries and all code must be native .net core 5

The code below can be changed in any way but the name of the service must remain the same.

namespace ringba_code_test
{

    public class HighlyOptimizedThreadSafeInMemoryDuplicateCheckService 
    {
       
        public bool IsThisTheFirstTimeWeHaveSeen(int id)
        {
            if (id < 0)
            {
                throw new ArgumentOutOfRangeException("id");
            }

            throw new NotImplementedException();
        }
    }

    public class HighlyOptimizedThreadSafeInMemoryDuplicateCheckServiceTest
    {
        [Fact]
        public void IsThisTheFirstTimeWeHaveSeenTest()
        {
            throw new NotImplementedException();
        }

    }
}

About

A Ringba algorithm test to be given before employment interviews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published