GithubHelp home page GithubHelp logo

Deepak Chaudhari's Projects

angry-professor icon angry-professor

A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor 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 cancelled. Example n=5 k=3 a = [-2,-1,0,1,2] The first 3 students arrived on or before time. The last 2 were late. The threshold is 3 students, so class will go on. Return YES. Note: Non-positive arrival times (arrivalTime=<0) indicate the student arrived early or on time; positive arrival times (arrivalTime>0) indicate the student arrived a[i] minutes late. Return string: either YES or NO 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[i]) that describe the arrival times for each student. Constraints 1<=t<=10 1<=n<=1000 1<=k<=n -100<=a[i]<=100 Sample Input 2 4 3 -1 -3 4 2 4 2 0 -1 2 1 Sample Output YES NO Explanation For the first test case, k=3. The professor wants at least 3 students in attendance, but only 2 have arrived on time ( -3 and -1) so the class is cancelled. For the second test case, k=2. The professor wants at least 2 students in attendance, and there are 2 who arrived on time (0 and 2). The class is not cancelled.

backend-journey icon backend-journey

A backend project resembling YouTube and Twitter, built with Node.js, Express.js, and MongoDB. Features user management, profile customization, watch history, and secure password encryption.

boolean-matrix-problem icon boolean-matrix-problem

Boolean Matrix Problem You are given a matrix Mat of m rows and n columns. The matrix is boolean so the elements of the matrix can only be either 0 or 1. Now, if any row of the matrix contains a 1, then you need to fill that whole row with 1. After doing the mentioned operation, you need to print the modified matrix. Input The first line of contains m and n denoting number of rows and number of columns. Then next m lines contain n elements denoting the elements of the matrix.

c-cpp-java-python-coding-differences icon c-cpp-java-python-coding-differences

These three programming languages are the most popular among the coders in terms of competitive coding and programming. C is structure/procedure oriented programming language as well as fast. C++ as of today in its efficiency, speed, and memory make it widely popular among coders. Java is platform-independent. It continues to add considerable value to the world of software development. Python requires less typing, provides new libraries, fast prototyping, and several other new features. C is the the first language that was very popular . It was designed to be very light. The popularity and impact of C can be seen in the fact that most languages that succeeded it are heavily influenced by it. C++ it was an effort to bring Object Oriented Programming elements into C. This helps us model programs as per real world objects. It was the first attempt to add OOP into the C language. Both C and C++ had a common basic problem--- they were platform dependent. This problem was become a major obstacle in their use over the internet. This lead to the rise of JAVA. Java was designed on the basis of C and C++ it removed the problem of Platform Dependency. It also tried to reduce the burden on programmers by adding many more buit in functions on this already heavy platform. As the size of the Java libraries increased they were using too much space. More over the while executing these programs you need as much free space on the server as the size of the program. That is to say You need 2KB of free space to run a 2KB Java program. With modern data internet traffic it is not a luxury that the back-end servers can afford. So a much lighter language Python is being used . Python was originally developed in the nineties but has gained popularity over in the last few years. It is much lighter and It is possible to run a 10 KB python program with as much free memory as the largest step.That is if the step which requires the largest memory is 3KB. The program can run with just 3 KB of space . It is extremely fast and it is also built on a framework of C.

cci icon cci

CrackingCodingInterview Problem Solutions (6th Edition)

competitive-code-solutions icon competitive-code-solutions

Here is the basic to peer level of codes using Python3 where you can understand basic needs to start any coding websites to improve your coding.

data-science-ipython-notebooks icon data-science-ipython-notebooks

Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.

data-structure-using-python icon data-structure-using-python

In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.

detection-of-spammed-mail- icon detection-of-spammed-mail-

Detected Spammed emails from an ‘SMS spam collection dataset’ with 98% accuracy. Used NLTK and Sklearn to preprocess the text data and classification.

diagonal-difference icon diagonal-difference

Diagonal Difference Given a square matrix, calculate the absolute difference between the sums of its diagonals. For example, the square matrix is shown below: 1 2 3 4 5 6 9 8 9 The left-to-right diagonal =1+5+9=15 . The right to left diagonal = 3+5+9 = 17. Their absolute difference is |15-17| = 2. Problem description

eduglore icon eduglore

The eduGlore is a pioneer institute in the field of English language training for fluent communication to crack various interview exams and also provide training for basic to advance grammar for Govt.

equality-in-array icon equality-in-array

Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value. Example arr= [1,2,2,3] Delete the 2 elements 1 and 3 leaving arr as [2,2]. If both twos plus either the 1 or the 3 are deleted, it takes 3 deletions to leave either [3] or [1]. The minimum number of deletions is . 2 Input Format The first line contains an integer n, the number of elements in arr. The next line contains n space-separated integers arr[i]. Constraints 0<n<=100 1<=arr[i]<=100 Sample Input 5 3 3 2 1 3

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.