GithubHelp home page GithubHelp logo

pratik-choudhari / algocode Goto Github PK

View Code? Open in Web Editor NEW
131.0 131.0 166.0 13.17 MB

Welcome everyone!🌟 Here you can solve problems, build scrappers and much more💻

Home Page: https://github.com/pratik-choudhari/AlgoCode

License: MIT License

Python 4.79% C++ 5.39% Java 3.90% C 0.83% JavaScript 2.72% CSS 0.17% Handlebars 0.12% HTML 0.70% Go 0.17% Jupyter Notebook 80.71% C# 0.41% TypeScript 0.09%
algorithms hacktoberfest open-source

algocode's Introduction

Hello World! 👋

I’m Pratik Choudhari, a backend developer, data engineer and a masters student @Uwindsor, CA. I am interested in everything data and system design.

🖋️ Blogs: Medium Python Engineer

💻 Hackerrank: https://www.hackerrank.com/profile/pratik_choudhari

Skills

Languages

Deployment

Database

Python tools/libraries

Connect with me

linkedin.com

Open-source contributions

Readme Card Readme Card

Checkout my pinned projects!

algocode's People

Contributors

0xnilesh avatar anu-ragi avatar atharvakarnik avatar ayeshw avatar c0d1ng-devta avatar ciandunne avatar codewdhruv avatar dhairya-parikh avatar drashtipatel2503 avatar itayz1230 avatar kartickgupta avatar kirkkm avatar kusumapriyankaajjarapu avatar nishitk-20 avatar pallavivaswani avatar pratik-choudhari avatar prattjena avatar ravidyarev avatar saurabh-daware avatar seniorglez avatar shivamyadav-coding avatar shraxo1 avatar skr-suyash avatar spidermath avatar srushtips avatar subhadeep1912 avatar susnatoprime007 avatar swarn10 avatar utkarshbajaj avatar vamsimudaliar avatar

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

algocode's Issues

Weather App

I would like to add my project of weather App.

Description

Currently it looks like this :-
Screenshot (15)
Screenshot (16)

After adding this project i will work on it and improve it's UI and features.
Stack that i used to make this project :-

  1. HTML
  2. CSS
  3. JavaScript
  4. NodeJs

It is a good beginners project in Web Development.

Scrape dictionary.com

Feature ✅

Description

The task here is to scrape dictionary.com for words and their meanings and store the scraped data into a json file.

Example

Must be able to run the script and json file should get generated.

Hint: In python use tqdm for updating progress
Mention programming language while requesting assignment

IP validation using Regex

Feature ✅

Description

Identify valid IP address using the power of regex.
IP address is a string in the form "A.B.C.D", where the value of A, B, C, and D may range from 0 to 255. Leading zeros are allowed. The length of A, B, C, or D can't be greater than 3.

Example

First line is number of test cases.
Input:
6
000.12.12.034
121.234.12.12
23.45.12.56
00.12.123.123123.123
122.23
Hello.IP

Output:
true
true
true
false
false
false

Contributors are supposed to mention their coding language while asking for assignment

Valid credit card number

Feature ✅

Description

Find if entered credit card number is valid number.
Conditions for a valid credit card number:
► It must start with a 4, 5 or 6.
► It must contain exactly 16 digits.
► It must only consist of digits (0-9).
► It may have digits in groups of 4, separated by one hyphen "-".
► It must NOT use any other separator like ' ' , '_', etc.
► It must NOT have 4 or more consecutive repeated digits.

Example

Input: 4253625879615786
Output: Yes

Input: 5122-2368-7954-3214
Output: Yes

Input: 42536258796157867
Output: No

Input: 44244x4424442444
Output: No

Contributors are supposed to mention their coding language while asking for assignment

scrape codeforces problem statements

Feature ✅

Description

Build a script to scrape Codeforces problem statements, as per the problem code provided by the user.
Save the result in a text file.

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Searching Algorithms

Feature ✅

Description

Searching Algorithms:

  • Binary Search
  • Fibonacci Search
  • Linear Search
  • Ternary Search
  • Median Search

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Number sorting with a twist

Feature ✅

Description

The task is to sort n numbers in ascending format based on following conditions:

  1. ith number can be exchanged only with i-1th position number.
  2. Complete operation can be performed in (n(n-1)/2 -1) exchanges.
    If both conditions are met print "YES" else print "NO"

Example

Input: 9 7 1 12 8
Output: YES

Input: 2 1
Output: NO

Internet speed test

Feature ✅

Description

Create a program to calculate Internet speed.

Example

Output Upload and Download speeds

Mention language when requesting assignment

Let's sort it out v1.0

Feature ✅

Description

The task is to implement:

  • Insertion sort
  • Selection sort
  • bubble sort

Example

First input will be name of algorithm followed by list of integers in next line.
Input: Selection
1 8 3 9 33 02 0 93 64 22 1 35

Output: sorted list of input

You are encourage not to copy code from online sources just for the name of open source contribution

Mention language in comments

Sudoku solver program

Feature ✅

Python sudoku solver

Description

A python program to solve a Sudoku board provided by the user as input. If the board is valid it solves the board and displays the final solution, else it raises an error message that the input was invalid.

Example

Input :-
input
Note :- The 0 s here refer to the empty cells in the board

Output :-
output
Note :- The empty cells have been filled up with the correct digits, indicated in red

Mini photo editor🖼

Feature ✅

Description

A program to perform following operations on an input image:

  • Enhance Sharpness
  • Enhance Colour
  • Blur
  • Resize
  • Black and white filter
  • Sepia filter

Example

The program must be menu driven at least. GUI or a Web interface would be excellent👏

This contribution will go under Projects folder.
Contributors are supposed to mention their coding language while asking for assignment

Closest 9's and 0's multiple

Feature ✅

Description

The problem is to find the least positive multiple of input number n. The multiple must only be made up of 9's and 0's, no other digit is allowed.

Example

First line is number of test cases.
Input:
2
3
7

Output:
90
9009

Challenge here is to figure out a way efficient than a brute force approach, dividing every number by n
Contributors are supposed to mention their coding language while asking for assignment

Rotate array by D elements

#Feature ✅

Description

Write a code to reverse the array by D elements clockwise.

Example

  1. Input: Array - 1 2 3
    D = 1
    Output: 2 3 1

  2. Input: Array - 5 8 9 4 2
    D = 3
    Output: 4 2 5 8 9

Checklist:

  • ✅ I have read the project guidelines.
  • ✅ I have checked all the existing projects, before submitting a new project issue.
  • ✅ This issue will be meaningful for the project.
  • ✅ I will contribute more in future

Contributors are supposed to mention their coding language while asking for assignment

Add code for Knapsack Problem

Feature ✅

Description

Knapsack problem (Select items such that the value is maximum but the Weight is within W)

Example

Input:
3 8
3 30
4 50
5 60

Output:
90

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Math expression evaluation

Feature ✅

Description

Write a program which can evaluate mathematical expressions in infix format.

Example

Input: 2 + 3 * ( 4 - 2 )
Output: 8

Note: Use stack
Mention programming language while requesting assignment

número perfecto🕶

Feature ✅

Description

Find all perfect number less than n

a perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect number.

Example

Input: 500

Output: 6 28 496

Note: perfect numbers value escalate quickly, checkout the list here

Searching Tree Algorithm Codes

Feature ✅

Inclusion of searching tree algorithms in the C/C++ codes.

Description

The search tree methods include Binary Search Tree, AVL Tree, Tries, B Trees, OS Trees, Interval Trees.

Checklist:

  • [ X] I have read the project guidelines.
  • [ X] I have checked all the existing projects, before submitting a new project issue.
  • [X ] This issue will be meaningful for the project.
  • [ X] I will contribute more in future

Giving back🤝

Since the day this repository is up, 80% of the questions have been put up by me.

It gets difficult for a maintainer to manage the PRs, solve github doubts and do daily chores. So I request you to contribute not only the solutions but also the questions.

The type of questions being asked can be seen in the issues, feel free to experiment. Appreciate everyone who helps, thanks✌

Complex numbers

Feature ✅

Description

A program to perform the following with two complex numbers A, B:

  • addition, A + B
  • subtraction, A- B
  • multiplication, A * B
  • division, A / B
  • mod(A)
  • mod(B)

Example

First input will be 1st number with real and imaginary part similarly second number.

Input:
2 1
5 6

Output:
7.00+7.00i
-3.00-5.00i
4.00+17.00i
0.26-0.11i
2.24+0.00i
7.81+0.00i

You are encourage not to copy code from online sources just for the name of open source contribution

Mention language in comments

Sorting Algorithms in C++

Feature ✅

I wish to add a seperate file for each sorting method

Description

This includes Bubble Sort, Selection Sort, Insertion Sort, Shell Sort, Merge Sort

Checklist:

  • [ X] I have read the project guidelines.
  • [ X] I have checked all the existing projects, before submitting a new project issue.
  • [ X] This issue will be meaningful for the project.
  • [ X] I will contribute more in future

Contributors are supposed to mention their coding language while asking for assignment

Prefix and Suffix Sums

Feature ✅

Description

Given an array of numbers, you have to print the prefix and suffix sums of the array.

Example

Input -
6
1 2 3 4 5 6

Output -
Prefix - 1 3 6 10 15 21
Suffix - 21 20 18 15 11 6

Mention language while requesting for assignment

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Tag parser

Feature ✅

Description

Given a set of tagged strings, output the tag contents.

Example

First line signifies number of input lines
Input: 4

<h1>This is a heading</h1>
<This_tag_doesnot_exist>Hello</This_tag_doesnot_exist>
<apple>Technology is growing</apple>
<user>Archit</user>

Output:
This is a heading
Hello
Technology is growing
Archit

Contributors are supposed to mention their coding language while asking for assignment

Add Code for LCS of 2 strings

#Feature ✅

Description

Code for LCS of 2 strings missing

Example

Input:
s = "axa"
t = "aa"

Output:
aa

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

To-do app🧾

Feature ✅

Description

Build a to-do app with a web interface in either Js or python

Example

User must be able to add tasks in the web interface and If a task is done mark it as done(dim the text or strike the text)
For this task it is mandatory to add the screenshot of resultant website with all possible cases inside README file.

Contributors are supposed to mention their coding language while asking for assignment

Let's sort it out v2.0

Feature ✅

Description

The task is to implement:

  • Merge sort
  • Shell sort
  • Radix sort

Example

First input will be name of algorithm followed by list of integers in next line.
Input: Shell
1 8 3 9 33 02 0 93 64 22 1 35

Output: sorted list of input

You are encourage not to copy code from online sources just for the name of open source contribution

Mention language in comments

Print matrix in spiral format.

Feature ✅

Description

Print the matrix input in a spiral format

Example

Input:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Output:
1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10

Mention language while requesting for assignment

Measures of dispersion

Feature ✅

Description

Calculate measures of dispersion for given distribution.
Measures of dispersion:

  • Range
  • Variance
  • Standard Deviation

Example

Input: 238,139,171,234,171,152,170,233,105,260

Output(2 decimal precision):
Range: 155
Variance: 2330.81
Standard deviation: 48.27

Mention language in comment

Armstrong number

Feature ✅

Description

For a given number n find all armstrong numbers less than n
An Armstrong number is the one whose sum of mth power of every digit in the number is equal to number itself, where m is the length of number

for 371: 33 + 77 + 13 = 371

Example

Input: 1000
Output: 1, 2, 3, 4, 5, 6, 7, 8, 9, 370, 371, 407

Mention language while requesting assignment

Sum of a sequence

Feature ✅

Description

Find the sum of all numbers in a sequence, where nth term is defined as:
Tn = n2 - (n - 1)2

Example

First line defines number of terms in sequence.
Output the sequence and sum.
Input: 3

Output:
Sequence: 1 3 5
Sum: 9

Contributors are supposed to mention their coding language while asking for assignment

scrape all hacktoberfest 2020 events

Feature ✅

Description

The script should scrape all the events from the Hacktoberfest event's website and stores them in a .CSV file.
LINK

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Calculator

Feature ✅

Description

Create a calculator that takes input from command line and outputs in the same window

Example

Input: 1
+
2
Output: 3

Note: This Calculator is a basic one, add your own new ideas such as trignometric functions, sqrt, log, square, exponents, etc. Or make it into a GUI!
Mention programming language while requesting assignment

Find the single element

Feature ✅

Description

Find the only word that appeared single time in the input

Example

Input: red
animal
bird
animal
bird

Output: red

Hint: Make use of bit-wise operation
Mention programming language while requesting assignment

Minimun swaps to make a palindrome

Feature ✅

Description

Write a program to calculate minimum number of swaps required to make a string palindrome.

Example

Input: niitn
Output: 1

Input: deideif
Output: 2
Explanation: swap 1->(d,f), swap 2-> (e, i)
Mention programming language while requesting assignment

K-Combination Generation

Feature ✅

Description

Given 2 numbers N and K and considering you have numbers ranging from 1 to N, print all the subsets of size K.

Example

Input -
5 3

Output -
1 2 3
1 2 4
1 2 5
1 3 4
1 3 5
1 4 5
2 3 4
2 3 5
2 4 5
3 4 5

Mention language while requesting for assignment

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Factorial of a large number

Feature ✅

Description

Calculate factorial of a large number such as 100 or 200

Example

Input: 100
Output : 933262154439441526816992388562667004-
907159682643816214685929638952175999-
932299156089414639761565182862536979-
208272237582511852109168640000000000-
00000000000000

⚠Note: The program must not use the normal logic of n! = n*(n-1)*...

Graph Traversal (BFS/DFS)

Feature ✅

Description

You are given an undirected unweighted graph in the form of an adjacency list (Resource on adjacency list). Given a starting and ending node number you have to output the number of nodes in the shortest path between the starting and ending node(excluding starting and ending nodes). Refer to examples for better understanding.

Input format -
N M
u1 v1
u2 v2
...
uM vM
A B

Here, N is the number of nodes and M is the number of edges. M lines follow where the ui vi represents and edge between node ui and vi. A and B are the starting and ending node respectively. Nodes are numbered from 1 to N.

Example

Input -
4 4
1 2
2 3
2 4
3 4
1 4

Output -
1

Explanation -
The shortest path between 1 and 4 is 1 --> 2 --> 4. Thus there is just 1 node between A and B.

Mention language while requesting for assignment

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Selection Sort in Java

Feature ✅

Description

Creating a sorting folder in Java to include sorting algorithms.

Example

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

scrape codechef problem statements

Feature ✅

Description

Build a script to scrape Codechef problem statements, as per the problem code provided by the user.
Scrape the following:
Problem Name, Problem Code, Problem statement, Input, Output, Sample Testcase, Note (usually there, after sample test case)
Save the result in a text file.

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Maximum Depth of N-ary Tree

Feature ✅

Description

Given a n-ary tree, find its maximum depth.

The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.

Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value.

Example

Example 1:

image

Input: root = [1,null,3,2,4,null,5,6]
Output: 3

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Build a google search using a python script

Feature ✅

Description

The script should show the top 10/20 google search results.

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Identify floating point numbers

Feature ✅

Description

Identify floating point numbers.

Example

Input: +4.00
Output: Yes

Input: +-5.00
Output: No

Input: -.7
Output: Yes

Input: 12.
Output: No

Input: 12.o0
Output: No

Contributors are supposed to mention their coding language while asking for assignment

Regenerate array with closest sum

Feature ✅

Find minimum value to be assigned to the elements so that sum becomes greater than initial sum.

Input: 4 2 1 10 6

Output: 5

Sum of original array = 4+2+1+10+6 = 23
Sum of modified array = 5+5+5+5+5 = 25
Mention programming language while requesting assignment

Measures of central tendency

Feature ✅

Description

For a given set of numbers calculate the Mean, Median and Mode

Example

Input: 8 9 4 6 7 25 44 6 8 15
Output: Mean: 13.2
Median: 8
Mode: 8, 6

Note: Look out for length of input it affects calculation of median and don't forget to sort the input!
Mention your language in comment

Find primes less than a number

Feature ✅

Description

Print all primes less than or equal to a given number

Example

Input: 27
Output: 2 3 5 7 11 13 17 19 23

Hint: Look up for Sieve of Eratosthenes

build a stock scraper

Feature ✅

Description

Scrape the S&P 500 Companies list from Wikipedia, Yahoo Finance, etc., then output the data.
Get stock prices.
HINT: yfinance, nsepy libraries in Python.

Checklist:

  • I have read the project guidelines.
  • I have checked all the existing projects, before submitting a new project issue.
  • This issue will be meaningful for the project.
  • I will contribute more in future

Find the Pth term in A.P

Feature ✅

Description

Given mth and nth term of an AP, find the pth term

Example

Format: m n mthterm nthterm p
Input: 6 10 12 20 5
Output: 10
Mention programming language while requesting assignment

Are these two anagrams?

Feature ✅

Description

A word is an anagram of another if they have same characters but in a different order.

Example

Input: listen silent
Output: Yes

Input: abcd abcdd
Output: No

Improvement:

If second word is an anagram check if it is a valid English word

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.