xeoneux / 30-days-of-code Goto Github PK
View Code? Open in Web Editor NEWπ¨βπ» 30 Days of Code by HackerRank Solutions in C, C++, C#, F#, Go, Java, JavaScript, Python, Ruby, Swift & TypeScript. PRs Welcome! π
π¨βπ» 30 Days of Code by HackerRank Solutions in C, C++, C#, F#, Go, Java, JavaScript, Python, Ruby, Swift & TypeScript. PRs Welcome! π
Task: Add solution for J - Exceptions - String to Integer task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
Kotlin language and create a Pull Request for the same. π
dicts={}
k=[]
n=int(input())
for _ in range(n):
entry=input().split(" ")
dicts[entry[0]]=entry[1]
while True:
try:
line = input()
except EOFError:
break
k.append(line)
for i in k:
if i in dicts:
print("{}={}".format(i,dicts[i]))
else:
print("Not found")
Task: Add solution for H - Linked List task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
Kotlin language and create a Pull Request for the same. π
Task: Add solution for 9 - Recursion task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for D - Inheritance task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
This file doesn't have a solution to the problem posted on HackerRank. It contains just the question part in Python.
Task: Add solution for G - Scope task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Task: Add solution for 4 - Class vs. Inheritance task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for F - Abstract Classes task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
Kotlin language and create a Pull Request for the same. π
Task: Add solution for 8 - Dictionaries and Maps task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in TypeScript language and create a Pull Request for the same. π
Task: Add solution for B - Binary Numbers task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Kotlin language and create a Pull Request for the same. π
Task: Add solution for H - Linked List task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Task: Add solution for B - Binary Numbers task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for 2 - Operators task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for G - Scope task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for 7 - Arrays task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Kotlin language and create a Pull Request for the same. π
Task: Add solution for 7 - Arrays task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for B - Binary Numbers task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in TypeScript language and create a Pull Request for the same. π
Task: Add solution for F - Abstract Classes task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
The solution provided for day7 fails for c++
Task: Add solution for 3 - Intro to Conditional Statements task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Missed writing
#include
I am facing a problem with trying to execute the Python code. It gives me a Runtime Error on Hackerrank. I couldn't understand what could have caused it. I even tried evaluating the case which threw the Runtime Error but I couldn't find anything wrong. The code doesn't have any errors too.
The solution doesn't works.
My solution for python.
sergiosolution;).txt
Task: Add solution for 5 - Loops task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Add solution for 6 - Let's Review task at 30 Days of Code by HackerRank in Kotlin language.
maximum=-9*7
Task: Add solution for D - Inheritance task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Task: Add solution for C - 2D Arrays task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Task: Add solution for F - Abstract Classes task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Traceback (most recent call last):
File "Solution.py", line 6, in
entry = str(input()).split(" ")
File "", line 1
Task: Add solution for C - 2D Arrays task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for 6 - Let's Review task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for D - Inheritance task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
Kotlin language and create a Pull Request for the same. π
The Let's review solution for python keeps breaking at line 3
The code requires more input than provided by stDIN.
The code breaks when you try to initialize "NumberOfStrings" input variable as an integer which gives an error as an alphabet cannot be conerted to an integer
The solution is to take out the "NumberOfStrings" variable.
Solution in next commmentπ
`
`
The solution for Golang (day 8) is not being accepted due to timeout. (taking too long)
Task: Add solution for C - 2D Arrays task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Kotlin language and create a Pull Request for the same. π
Task: Add solution for J - Exceptions - String to Integer task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
TypeScript language and create a Pull Request for the same. π
Task: Add solution for 7 - Arrays task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in TypeScript language and create a Pull Request for the same. π
error: invalid path '0 - Hello, World./Solution.c'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
@xeoneux
Task: Add solution for 8 - Dictionaries and Maps task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Kotlin language and create a Pull Request for the same. π
Can i add golang versions of following solutions ?
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, B, C, N, T, V, W, X, Z.
Task: Add solution for G - Scope task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in
Kotlin language and create a Pull Request for the same. π
#include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
int main()
{
int N,ol_itr=0;
vector<string> output_list;
string foo;
cin >> N;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
for (int N_itr = 0; N_itr < N; N_itr++) {
string firstNameEmailID_temp;
getline(cin, firstNameEmailID_temp);
vector<string> firstNameEmailID = split_string(firstNameEmailID_temp);
string firstName = firstNameEmailID[0];
string emailID = firstNameEmailID[1];
if((emailID.find("@gmail.com")) < emailID.size()){
output_list.insert(output_list.end(),firstName);
}
}
sort(output_list.begin(),output_list.end());
for (auto i = output_list.begin(); i != output_list.end(); ++i)
cout << *i << endl;
return 0;
}
vector<string> split_string(string input_string) {
string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) {
return x == y and x == ' ';
});
input_string.erase(new_end, input_string.end());
while (input_string[input_string.length() - 1] == ' ') {
input_string.pop_back();
}
vector<string> splits;
char delimiter = ' ';
size_t i = 0;
size_t pos = input_string.find(delimiter);
while (pos != string::npos) {
splits.push_back(input_string.substr(i, pos - i));
i = pos + 1;
pos = input_string.find(delimiter, i);
}
splits.push_back(input_string.substr(i, min(pos, input_string.length()) - i + 1));
return splits;
}
Kindly check
Task: Add solution for 0 - Hello, World. task at 30 Days of Code by HackerRank in Ruby language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Ruby language and create a Pull Request for the same. π
Task: Add solution for 9 - Recursion task at 30 Days of Code by HackerRank in Kotlin language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in Kotlin language and create a Pull Request for the same. π
Task: Add solution for 9 - Recursion task at 30 Days of Code by HackerRank in TypeScript language.
Process: Register at https://www.hackerrank.com and then figure out the mentioned task for 30 Days of Code in TypeScript language and create a Pull Request for the same. π
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.