Git Product home page Git Product logo

xeoneux / 30-days-of-code Goto Github PK

View Code? Open in Web Editor NEW
928.0 59.0 446.0 422 KB

πŸ‘¨β€πŸ’» 30 Days of Code by HackerRank Solutions in C, C++, C#, F#, Go, Java, JavaScript, Python, Ruby, Swift & TypeScript. PRs Welcome! πŸ˜„

Java 13.11% C# 12.83% Swift 9.09% Python 8.06% C++ 10.71% F# 3.82% TypeScript 4.28% Kotlin 6.37% Ruby 4.39% Go 3.90% Lua 0.03% Clojure 0.08% Scala 1.89% C 12.03% COBOL 0.33% Perl 0.18% Pascal 0.05% Shell 0.05% Racket 0.11% JavaScript 8.69%
hackerrank java swift python csharp fsharp cplusplus solutions 30 days

30-days-of-code's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

30-days-of-code's Issues

Day 8 code in python fails for test case 0, this will work

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")

Issue with 30-Days-of-Code/8 - Dictionaries and Maps/Solution.py

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.

traceback

Traceback (most recent call last):
File "Solution.py", line 6, in
entry = str(input()).split(" ")
File "", line 1

Python Day 6

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πŸ‘‡

`

`

Golang Day 8 timeout

The solution for Golang (day 8) is not being accepted due to timeout. (taking too long)

Code Contribution In javaScript and Python

  • I want to contribute to code with JavaScript.
  • Unable to clone this repo, getting some issues

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

Go support?

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.

solution for day 28 in cpp

#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;
}

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.