Coder Social home page Coder Social logo

cs-theory's Introduction

Computer Science Theory

Algorithms and Data Structure

Contains Leetcode and Hacker Rank questions and answers.

To test locally, make sure you have Node.js installed For example to run the solution for sorting problem, run node javascript/sortList.js to test the solution for the sorting problem.

To run from the file with all the solution, for example to run sortList solution , use the following command:

node --eval "require('./javascript/arrays.js').sortList()"

Problems

  1. Remove Duplicates from Sorted Array sort-list.js Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length. (Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.)

  2. Write a code that can convert intergers to Roman numerals (20 min) I = 1, X= 10, IX= 9, XI= 11, L =50, C= 100, D= 500, M= 1000

  3. The mall management is trying to figure out what was the busiest moment in the mall in the last year. Each data entry includes a timestamp (seconds in Unix Epoch format), an amount of people and whether they entered or exited. reference

  4. Find the number!Given an unsorted array of n elements, find if the element k is present in the array or not.Complete the findNumber function in the editor below. It has 2 parameters:An array of integers, arr, denoting the elements in the array.An integer, k, denoting the element to be searched in the array.The function must return a string "YES" or "NO" denoting if the element is present in the array or not.

cs-theory's People

Contributors

jonas-kgomo avatar

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.