Giter Site home page Giter Site logo

sakigo9 / 21daysoflockdown Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 9.0 111 KB

Quarantine + Coding + Lock down = New Challenge

Python 72.42% C 5.02% C++ 15.17% JavaScript 7.40%
hacktoberfest python-3 datastructures-algorithms hackerrank hacktoberfest2022

21daysoflockdown's Introduction

21 days of Lockdown

Quarantine

Day 1: 25 march 2020 (Hacker rank)

Today's Progress: Solved HackerRank Python question. And few Qustion on problem solving.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 2: 26 march 2020 (Hacker rank + Coding Ninjas Event)

Today's Progress: Got my bronze bage in problem solving in Hacker Rank. Given 5th test in coding Ninja.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 3: 27 march 2020 (Hacker rank Azure Documentation)

Today's Progress: Got my second star in problem sloving assesment in hacker Rank. Saw few azure documentation.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 4: 28 march 2020 (Hacker rank Portfolio Website Unity Game)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm. Worked on my portfolio website and learn essentials of making games in unity.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 5: 29 march 2020 (Hacker rank )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 6: 30 march 2020 (Hacker rank + Portfolio)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 7: 31 march 2020 (Hacker rank + Portfolio + Azure Cognitive Services)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm. Getting the designing part of my portfolio done. Also looked into the cognitive rest api basics.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 8: 1 April 2020 (Hacker rank + Portfolio + Azure Cognitive Services)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm and Python. Getting the designing part of my portfolio done. Also looked into the cognitive rest api basics.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 9: 2 April 2020 (Hacker rank + Portfolio + Azure Cognitive Services)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm and Python. Getting the background part of my portfolio done. Prepared ppts for the azure Rest api demo.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 10: 3 April 2020 (Hacker rank + Portfolio )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm and Python. Getting the designingcontent and description part of my portfolio done.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 11: 4 April 2020 (Hacker rank + PlacementPrep )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Practising pointers.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 12: 5 April 2020 (Hacker rank + PlacementPrep )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Cleared concept of pointers.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 13: 6 April 2020 (Hacker rank + Portfolio )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Almost completed my portfolio website.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/

Day 14: 7 April 2020 (Hacker rank + Portfolio )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Completed my portfolio website.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 15: 8 April 2020 (Hacker rank + LeetCode )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Solved my first question in leedcode.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 16: 9 April 2020 (Hacker rank + IEEE paper )

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Going through IEEE paper.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 17: 10 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm . Going through IEEE paper.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 18: 11 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 19: 12 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 20: 13 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 21: 14 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 22: 15 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 23: 16 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 24: 17 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 25: 18 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 26: 19 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 27: 20 April 2020 (Hacker rank)

Today's Progress: Solved hackerRank Question based on Data Structure and Algorithm .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 29: 21 April 2020 (Hacker rank)

Today's Progress: Learned Dynamic memory Allocation using c. Studied linked List .

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

Day 30: 21 April 2020 (Hacker rank)

Today's Progress: Solved few Hackerrank Problems.

**Link to work:**https://github.com/sakigo9/21DaysOfLockdown/tree/master/Day%201 [2] https://www.hackerrank.com/saketprag322

21daysoflockdown's People

Contributors

ayu-raj avatar gitavinashksingh avatar gitavinashsingh avatar kritsharma34 avatar mejyoti avatar phoenixfury007 avatar piku19348 avatar prashantisnottaken avatar saket9 avatar sakigo9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

21daysoflockdown's Issues

C++ Code for BeautifulDayAtTheMovie

`#include <bits/stdc++.h>

using namespace std;

string ltrim(const string &);
string rtrim(const string &);
vector split(const string &);

/*

  • Complete the 'angryProfessor' function below.
  • The function is expected to return a STRING.
  • The function accepts following parameters:
    1. INTEGER k
    1. INTEGER_ARRAY a
      */

string angryProfessor(int k, vector a) {
int check=0;
for(auto i:a){
if(i<=0){
check++;
}
}
if(check>=k){
return "NO";
}

return "YES";

}
int main()
{
ofstream fout(getenv("OUTPUT_PATH"));

string t_temp;
getline(cin, t_temp);

int t = stoi(ltrim(rtrim(t_temp)));

for (int t_itr = 0; t_itr < t; t_itr++) {
    string first_multiple_input_temp;
    getline(cin, first_multiple_input_temp);

    vector<string> first_multiple_input = split(rtrim(first_multiple_input_temp));

    int n = stoi(first_multiple_input[0]);

    int k = stoi(first_multiple_input[1]);

    string a_temp_temp;
    getline(cin, a_temp_temp);

    vector<string> a_temp = split(rtrim(a_temp_temp));

    vector<int> a(n);

    for (int i = 0; i < n; i++) {
        int a_item = stoi(a_temp[i]);

        a[i] = a_item;
    }

    string result = angryProfessor(k, a);

    fout << result << "\n";
}

fout.close();

return 0;

}

string ltrim(const string &str) {
string s(str);

s.erase(
    s.begin(),
    find_if(s.begin(), s.end(), not1(ptr_fun<int, int>(isspace)))
);

return s;

}

string rtrim(const string &str) {
string s(str);

s.erase(
    find_if(s.rbegin(), s.rend(), not1(ptr_fun<int, int>(isspace))).base(),
    s.end()
);

return s;

}

vector split(const string &str) {
vector tokens;

string::size_type start = 0;
string::size_type end = 0;

while ((end = str.find(" ", start)) != string::npos) {
    tokens.push_back(str.substr(start, end - start));

    start = end + 1;
}

tokens.push_back(str.substr(start));

return tokens;

}
`

Panagrams javascript Code

`'use strict';

const fs = require('fs');

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', function(inputStdin) {
inputString += inputStdin;
});

process.stdin.on('end', function() {
inputString = inputString.split('\n');

main();

});

function readLine() {
return inputString[currentLine++];
}

/*

  • Complete the 'pangrams' function below.
  • The function is expected to return a STRING.
  • The function accepts STRING s as parameter.
    */

function pangrams(s) {
return new Set(s.toLowerCase()).size > 26 ? "pangram":"not pangram";
}
function main() {
const ws = fs.createWriteStream(process.env.OUTPUT_PATH);

const s = readLine();

const result = pangrams(s);

ws.write(result + '\n');

ws.end();

}
`

Solution using C++

`#include <bits/stdc++.h>

using namespace std;

string ltrim(const string &);
string rtrim(const string &);
vector split(const string &);

string kangaroo(int x1, int v1, int x2, int v2) {
for(int i=1;i<10000;i++){
if(x1+v1i==x2+v2i){
return "YES";
}
}
return "NO";
}

int main()
{
ofstream fout(getenv("OUTPUT_PATH"));

string first_multiple_input_temp;
getline(cin, first_multiple_input_temp);

vector<string> first_multiple_input = split(rtrim(first_multiple_input_temp));

int x1 = stoi(first_multiple_input[0]);

int v1 = stoi(first_multiple_input[1]);

int x2 = stoi(first_multiple_input[2]);

int v2 = stoi(first_multiple_input[3]);

string result = kangaroo(x1, v1, x2, v2);

fout << result << "\n";

fout.close();

return 0;

}

string ltrim(const string &str) {
string s(str);

s.erase(
    s.begin(),
    find_if(s.begin(), s.end(), not1(ptr_fun<int, int>(isspace)))
);

return s;

}

string rtrim(const string &str) {
string s(str);

s.erase(
    find_if(s.rbegin(), s.rend(), not1(ptr_fun<int, int>(isspace))).base(),
    s.end()
);

return s;

}

vector split(const string &str) {
vector tokens;

string::size_type start = 0;
string::size_type end = 0;

while ((end = str.find(" ", start)) != string::npos) {
    tokens.push_back(str.substr(start, end - start));

    start = end + 1;
}

tokens.push_back(str.substr(start));

return tokens;

}
`

Time Complexity : O(N)

JS Code

`'use strict';

const fs = require('fs');

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', function(inputStdin) {
inputString += inputStdin;
});

process.stdin.on('end', function() {
inputString = inputString.split('\n');

main();

});

function readLine() {
return inputString[currentLine++];
}

/*

  • Complete the 'pangrams' function below.
  • The function is expected to return a STRING.
  • The function accepts STRING s as parameter.
    */

function pangrams(s) {
return new Set(s.toLowerCase()).size > 26 ? "pangram":"not pangram";
}
function main() {
const ws = fs.createWriteStream(process.env.OUTPUT_PATH);

const s = readLine();

const result = pangrams(s);

ws.write(result + '\n');

ws.end();

}
`

Equalize Array C++ Code.

`#include <bits/stdc++.h>
#include
using namespace std;

string ltrim(const string &);
string rtrim(const string &);
vector split(const string &);

/*

  • Complete the 'equalizeArray' function below.
  • The function is expected to return an INTEGER.
  • The function accepts INTEGER_ARRAY arr as parameter.
    */

int equalizeArray(vector arr) {
map<int,int> mp;
for(auto i: arr){
mp[i]++;
}
int c=0;
int res=INT_MIN;
for(auto i:mp){

       res=max(res,i.second);

}
for(auto i :mp){
if(i.second!=res){
c+=i.second;
}
}
return c;
}

int main()
{
ofstream fout(getenv("OUTPUT_PATH"));

string n_temp;
getline(cin, n_temp);

int n = stoi(ltrim(rtrim(n_temp)));

string arr_temp_temp;
getline(cin, arr_temp_temp);

vector<string> arr_temp = split(rtrim(arr_temp_temp));

vector<int> arr(n);

for (int i = 0; i < n; i++) {
    int arr_item = stoi(arr_temp[i]);

    arr[i] = arr_item;
}

int result = equalizeArray(arr);

fout << result << "\n";

fout.close();

return 0;

}

string ltrim(const string &str) {
string s(str);

s.erase(
    s.begin(),
    find_if(s.begin(), s.end(), not1(ptr_fun<int, int>(isspace)))
);

return s;

}

string rtrim(const string &str) {
string s(str);

s.erase(
    find_if(s.rbegin(), s.rend(), not1(ptr_fun<int, int>(isspace))).base(),
    s.end()
);

return s;

}

vector split(const string &str) {
vector tokens;

string::size_type start = 0;
string::size_type end = 0;

while ((end = str.find(" ", start)) != string::npos) {
    tokens.push_back(str.substr(start, end - start));

    start = end + 1;
}

tokens.push_back(str.substr(start));

return tokens;

}
`

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.