Coder Social home page Coder Social logo

Matheus Gimpel Moreira de Amorim's Projects

sort-search-time icon sort-search-time

Sorting and searching methods The use of ordered vectors is quite intense in computing. These vectors form a more efficient basis for search methods, as in the case of binary search. In this sense, in this project you must write a program to search for elements of a given vector A in another vector B, using the techniques listed below and measuring the time required in each one. To be clearer, your program must search, within the vector B, for each of the elements of the vector A, counting how many of them were found (this result should be shown on the screen). For each execution your program must ask which technique will be used and measure the application of that technique. The times presented as a response must be the average of 5 executions of each technique. In all tests, vector A will have a total of 2000 integers and vector B will have a total of 200 thousand integers. The techniques to be measured, including the time to do the ordering when applicable, are: 1Sequential search with disordered vector B. 2Search sequentially with vector B ordered by the bubble sort. 3Binary search with vector B ordered by bubble sort. 4Weighed search with vector B ordered by bubble sort. 5 Sequential search with vector B ordered by insertion sort. 6Binary search with vector B ordered by insertion sort. 7 Weighted search with vector B ordered by insertion sort. 8 Sequential search with vector B ordered by selection sort. 9Binary search with vector B ordered by selection sort. 10Weighed search with vector B ordered by selection sort. The function for generating the values ​​to be stored in vectors A and B is given by:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.