GithubHelp home page GithubHelp logo

Kaushik Dhola's Projects

angry-professor icon angry-professor

A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, he decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time (ArrivalTime <= 0) to arrived late (ArrivalTime > 0). Given the arrival time of each student and a threshhold number of attendees, determine if the class is canceled. Input Format The first line of input contains t, the number of test cases. Each test case consists of two lines. The first line has two space-separated integers, n and k, the number of students (size of a) and the cancellation threshold. The second line contains n space-separated integers (a[1],a[2],..,a[n]) describing the arrival times for each student. Note: Non-positive arrival times (a[i]<=0) indicate the student arrived early or on time; positive arrival times (a[i]>0) indicate the student arrived a[i] minutes late. For example, there are n=6 students who arrive at times a=[-1,-1,0,0,1,1]. Four are there on time, and two arrive late. If there must be k=4 for class to go on, in this case the class will continue. If there must be k=5, then class is cancelled. Function Description Complete the angryProfessor function in the editor below. It must return YES if class is cancelled, or NO otherwise. angryProfessor has the following parameter(s): k: the threshold number of students a: an array of integers representing arrival times

anti-theft-app icon anti-theft-app

An Android application which help to find and track a stolen mobile phone. Stores the IMSI number and keeps checking continuously for a SIM change and ultimately sends SMS to the “alternative number” with location. Reads incoming messages from alternate phone number and performs data wipe out when requested. This application runs in background without the intervention of the user.

awesome-nlp icon awesome-nlp

:book: A curated list of resources dedicated to Natural Language Processing (NLP)

docs icon docs

The open-source repo for docs.github.com

kangaroo icon kangaroo

You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at a rate of v1 meters per jump. The second kangaroo starts at location x2 and moves at a rate of v2 meters per jump. You have to figure out a way to get both kangaroos at the same location at the same time as part of the show. If it is possible, return YES, otherwise return NO. For example, kangaroo 1 starts at x1=2 with a jump distance v1=1 and kangaroo 2 starts at x2=1 with a jump distance of v2=2. After one jump, they are both at x=3,(x1+v1=2,x2+v2=1+2), so our answer is YES. Function Description Complete the function kangaroo in the editor below. It should return YES if they reach the same position at the same time, or NO if they don't. kangaroo has the following parameter(s): x1, v1: integers, starting position and jump distance for kangaroo 1 x2, v2: integers, starting position and jump distance for kangaroo 2 Input Format A single line of four space-separated integers denoting the respective values of x1,v1,x2, and v2. Constraints 0 <x1<x2<10000 1<v1<10000 1<v2<10000 Output Format Print YES if they can land on the same location at the same time; otherwise, print NO.

noticeboardphp icon noticeboardphp

An online notice board is a place where people can post any types of messages and notifications, for example, to advertise things, announce events or provide any information. Notice board online it can be placed on digital devices such computers, tabs, mobile phones etc.

questgen.ai icon questgen.ai

Question generation using state-of-the-art Natural Language Processing algorithms

sock-merchant icon sock-merchant

John works at a clothing store. He has a large pile of socks that he must pair by color for sale. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are. For example, there are n=7 socks with colors ar= [1,2,1,2,1,3,2]. There is one pair of color 1 and one of color 2. There are three odd socks left, one of each color. The number of pairs is 2. Function Description Complete the sockMerchant function in the editor below. It must return an integer representing the number of matching pairs of socks that are available. sockMerchant has the following parameter(s): n: the number of socks in the pile ar: the colors of each sock Input Format The first line contains an integer n, the number of socks represented in ar. The second line contains n space-separated integers describing the colors ar[i] of the socks in the pile. Output Format Return the total number of matching pairs of socks that John can sell.

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.