├── 2020-Freshers └── goodie-dilemma │ ├── sample_output.txt │ ├── sample_input.txt │ ├── instructions_to_submit │ └── problem_statement - goodie_dilemma ├── README.md ├── 2022-Freshers └── Greedy-Job │ ├── instructions_to_submit │ └── problem_statement - goodie_dilemma └── .gitignore /2020-Freshers/goodie-dilemma/sample_output.txt: -------------------------------------------------------------------------------- 1 | The goodies selected for distribution are: 2 | 3 | Fitbit Plus: 7980 4 | Microwave Oven: 9800 5 | Alexa: 9999 6 | Digital Camera: 11101 7 | 8 | And the difference between the chosen goodie with highest price and the lowest price is 3121 -------------------------------------------------------------------------------- /2020-Freshers/goodie-dilemma/sample_input.txt: -------------------------------------------------------------------------------- 1 | Number of employees: 4 2 | 3 | Goodies and Prices: 4 | 5 | Fitbit Plus: 7980 6 | IPods: 22349 7 | MI Band: 999 8 | Cult Pass: 2799 9 | Macbook Pro: 229900 10 | Digital Camera: 11101 11 | Alexa: 9999 12 | Sandwich Toaster: 2195 13 | Microwave Oven: 9800 14 | Scale: 4999 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README # 2 | 3 | ### What is this repository for? ### 4 | 5 | * Contains all the interview assignments and interview questions 6 | 7 | ### Contribution guidelines ### 8 | 9 | * If you find any mistake in the question or if you want to propose a new question, create a branch with your name and send a PR. I fyou are a candidate, do not send pull request to this repo. 10 | -------------------------------------------------------------------------------- /2022-Freshers/Greedy-Job/instructions_to_submit: -------------------------------------------------------------------------------- 1 | 1. Screen record the execution of the code. The recording should have the footage of input file content and the output file content. 2 | 3 | 2. Push the recording along with the instructions to run your code to your own public git repository - master branch and email us the link. 4 | 5 | 3. The recording should contain atleast 3 success test cases. 6 | 7 | 4. Add appropriate comments wherever needed. 8 | -------------------------------------------------------------------------------- /2020-Freshers/goodie-dilemma/instructions_to_submit: -------------------------------------------------------------------------------- 1 | 1. Screen record the execution of the code. The recording should have the footage of input file content and the output file content. 2 | 3 | 2. Push the recording along with the instructions to run your code to your own public git repository - master branch and email us the link. 4 | 5 | 3. The recording should contain atleast 3 success test cases. 6 | 7 | 4. Add appropriate comments wherever needed. 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # These are some examples of commonly ignored file patterns. 2 | # You should customize this list as applicable to your project. 3 | # Learn more about .gitignore: 4 | # https://www.atlassian.com/git/tutorials/saving-changes/gitignore 5 | 6 | # Node artifact files 7 | node_modules/ 8 | dist/ 9 | 10 | # Compiled Java class files 11 | *.class 12 | 13 | # Compiled Python bytecode 14 | *.py[cod] 15 | 16 | # Log files 17 | *.log 18 | 19 | # Package files 20 | *.jar 21 | 22 | # Maven 23 | target/ 24 | dist/ 25 | 26 | # JetBrains IDE 27 | .idea/ 28 | 29 | # Unit test reports 30 | TEST*.xml 31 | 32 | # Generated by MacOS 33 | .DS_Store 34 | 35 | # Generated by Windows 36 | Thumbs.db 37 | 38 | # Applications 39 | *.app 40 | *.exe 41 | *.war 42 | 43 | # Large media files 44 | *.mp4 45 | *.tiff 46 | *.avi 47 | *.flv 48 | *.mov 49 | *.wmv 50 | *.jjj 51 | 52 | -------------------------------------------------------------------------------- /2020-Freshers/goodie-dilemma/problem_statement - goodie_dilemma: -------------------------------------------------------------------------------- 1 | Let's say the HR team of a company has goodies set of size N each with a different price tag for each goodie. Now the HR team has to distribute the goodies among the M employees in the company such that one employee receives one goodie. Find out the goodies the HR team can distribute so that the difference between the low price goodie and the high price goodie selected is minimum. 2 | 3 | Input: 4 | Goodies and Prices: 5 | Fitbit Plus: 7980 6 | IPods: 22349 7 | MI Band: 999 8 | Cult Pass: 2799 9 | Macbook Pro: 229900 10 | Digital Camera: 11101 11 | Alexa: 9999 12 | Sandwich Toaster: 2195 13 | Microwave Oven: 9800 14 | Scale: 4999 15 | 16 | Example Output 17 | 18 | Number of the employees: 4 19 | 20 | Here the goodies that are selected for distribution are: 21 | Fitbit Plus: 7980 22 | Microwave Oven: 9800 23 | Alexa: 9999 24 | Digital Camera: 11101 25 | 26 | And the difference between the chosen goodie with highest price and the lowest price is 3121 27 | 28 | 29 | Number of employees: 6 30 | 31 | Here the goodies that are selected for distribution are: 32 | Sandwich Toaster: 2195 33 | Cult Pass: 2799 34 | Scale: 4999 35 | Fitbit Plus: 7980 36 | Microwave Oven: 9800 37 | Alexa: 9999 38 | 39 | And the difference between the chosen goodie with highest price and the lowest price is 7804 40 | 41 | 42 | Number of employees: 2 43 | 44 | Here the goodies that are selected for distribution are: 45 | Microwave Oven: 9800 46 | Alexa: 9999 47 | 48 | And the difference between the chosen goodie with highest price and the lowest price is 199 49 | 50 | 51 | The input has to be read from a file. The input file contains the all the goodies and their prices as shown in the example input file sample_input.txt in the current folder . 52 | The output has to be written to a file as shown in the example output file sample_output.txt in the current folder. 53 | 54 | Usage of any libraries provided by the language or the framework used is restricted, except for the Mathematics and the I/O libraries. -------------------------------------------------------------------------------- /2022-Freshers/Greedy-Job/problem_statement - goodie_dilemma: -------------------------------------------------------------------------------- 1 | Coding Assignment 2 | Problem Statement : A factory has a list of jobs to perform. Each job has a start time, end time, and profit value. The manager has asked his employee Lokesh to pick jobs of his choice. Lokesh wants to select jobs for him in such a way that would maximize his earnings. 3 | Given a list of jobs how many jobs and total earnings are left for other employees once Lokesh picks jobs of his choice. 4 | Note: Lokesh can perform only one job at a time. 5 | 6 | Input format: 7 | Each Job has 3 pieces of info – Start Time, End Time, and Profit 8 | The first line contains the number of Jobs for the day. Say ‘n’. So there will be ’3n' lines following as each job has 3 lines. 9 | Each of the next ‘3n’ lines contains jobs in the following format: 10 | start_time 11 | end-time 12 | Profit 13 | start-time and end-time are in HHMM 24HRS format i.e. 9am is 0900 and 9PM is 2100 14 | 15 | Constraints: 16 | The number of jobs in the day is less than 100 i.e. 0<_n<_10 17 | The start time is always less than the end, and Hours can go only up to 2359. 18 | 19 | Output format: 20 | The program should return an array of 2 integers where 1st one is the number of jobs left and the earnings of other employees. 21 | 22 | Sample Input: 1 23 | Enter the number of Jobs 24 | 3 25 | Enter job start time, end time, and earnings 26 | 0900 27 | 1030 28 | 100 29 | 1000 30 | 1200 31 | 500 32 | 1100 33 | 1200 34 | 300 35 | Sample Output: 1 36 | The number of tasks and earnings available for others 37 | Task: 2 38 | Earnings: 400 39 | 40 | Sample Input: 2 41 | Enter the number of Jobs 42 | 3 43 | Enter job start time, end time, and earnings 44 | 0900 45 | 1000 46 | 250 47 | 0945 48 | 1200 49 | 550 50 | 1130 51 | 1500 52 | 150 53 | Sample Output: 2 54 | The number of tasks and earnings available for others 55 | Task: 2 56 | Earnings: 400 57 | 58 | Sample Input:3 59 | Enter the number of Jobs 60 | 3 61 | Enter job start time, end time, and earnings 62 | 0900 63 | 1030 64 | 100 65 | 1000 66 | 1200 67 | 100 68 | 1100 69 | 1200 70 | 100 71 | Sample Output: 3 72 | The number of tasks and earnings available for others 73 | Task: 1 74 | Earnings: 100 75 | --------------------------------------------------------------------------------