Giter VIP home page Giter VIP logo

edualgo / interview-corner Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 41.0 5.63 MB

Many time, when an interview approaches, candidates start searching for different algorithms in different programming languages for practise. This project aims to build a website which will contain the codes along with the techniques and explanations so that it can be helpful for many

Home Page: https://opensource.edualgoacademy.com/interview-corner/

License: MIT License

C++ 4.55% Python 2.94% HTML 43.31% CSS 15.09% JavaScript 32.05% Less 0.14% SCSS 1.92%
algorithms cpp css3 datastructures hacktoberfest hacktoberfest2021 html5 interview-approaches python3 website

interview-corner's Introduction


       

Objective

A python package published at PyPi. The project can be viewed here => PyPi - eduAlgo. Don't forget to create an ISSUE before making a PR and always make PR to this repo - Main eduAlgo

Stats

Maintenance PyPI format GitHub contributors

Downloads Downloads Downloads

forthebadge forthebadge forthebadge

Aim Of The Package

This is a very simple python package made up with python script to study different algorithms for educational purposes. This package is currently under planning version and aims to achieve the following :-

  • To put together all the available algorithms
  • Help students with learning space and time complexity
  • Visualizing Algorithms
  • Getting resources, articles etc. to study about python and Algorithms
  • Become a handy tool for the programmers while using different algorithms on daily basis

Organization

This project is a part of the organization Edualgo Academy.

We are an opensource organization having a few open-sourced projects on github related to Data structures and Algorithms in Python, Flutter Development & Frontend Development. chek the organization here - eduAlgo

Documentation

The documentation for the included methods and their implementations can be found here => eduAlgo-Documentation

Algorithms Yet to Publish

  • Searching Algorithms and Visualizations
  • Sorting Algorithms and Visualizations
  • Graph Algorithms and Visualizations
  • Linked List Implementations and Vizualizations
  • Tree Types, Vizualizations and Implementations

Installation

Fast install:

pip install eduAlgo

Example

from edualgo import LinkedList as ll
llist1 = ll.linkedlist()
llist2 = ll.linkedlist()

arr1 = list(map(int,input().split()))
arr2 = list(map(int,input().split()))

for i in arr1:
    llist1.append(i)

for i in arr2:
    llist2.append(i)

sol = ll.list_algorithms()

llist3 = ll.linkedlist()
llist3.head = sol.mergeTwoLists(llist1.head,llist2.head)
llist3.printLL()

Input:

  1 2 3
  2 3 4

Output:

  1 2 2 3 3 4

Communities/Hackathon/Conferences (In which the project was a part of)


FOSS Hack - 2020 (12th & 13th September 2020)

PyCon - 2020 Devsprint ( 04th & 05th October 2020)

Hacktoberfest 2020 (October 2020)

Winter of Code - DSC, NSEC

Latest Winter Update (Package Demo)

Tutorials

License

This package is under MIT License copyright @Abhijit Tripathy. The production code can be checked at the production branch of this repository.

Our sponsors

This project is supported by:

About The Creator

Abhijit Tripathy
DSA Developer and Python Programmer

Our contributors

Made with contrib.rocks.

interview-corner'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

Watchers

 avatar  avatar

interview-corner's Issues

TOWER OF HANOI

Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move all disks from source rod to destination rod using a third rod (say auxiliary). The rules are :

  1. Only one disk can be moved at a time.
  2. A disk can be moved only if it is on the top of a rod.
  3. No disk can be placed on top of a smaller disk.
    Print the steps required to move n disks from source rod to destination rod.
    Source Rod is named as 'a', auxiliary rod as 'b', and destination rod as 'c'.
    Input Format :
    Integer n
    Output Format :
    Steps in different lines (in one line print source and destination rod name separated by space)
    Constraints :
    0 <= n <= 20
    Sample Input 1 :
    2
    Sample Output 1 :
    a b
    a c
    b c
    Sample Input 2 :
    3
    Sample Output 2 :
    a c
    a b
    c b
    a c
    b a
    b c
    a c

I WILL USE CPP FOR SOLVE THIS ISSUE

Finding the majority?

Given an array of size N and two elements x and y, use counter variables to find which element appears most in the array, x or y. If both elements have the same frequency, then return the smaller element.

Input:
N = 11
arr[] = {1,1,2,2,3,3,4,4,4,4,5}
x = 4, y = 5
Output: 4
Explanation:
frequency of 4 is 4.
frequency of 5 is 1.

One Dimensional Array -> Maximum Absolute Difference : Add C++ code and fix some bugs

Hello @Abhijit2505 !
I am Rashi, a Participant of SWOC'21. I have found a few issues on the page - Maximum Absolute Difference in the section One Dimensional Array and would like to work on them.
Link to the page - https://abhijit2505.github.io/Algorithmic-Treasure-Site/Pages/Array/maxAbsoluteDiff.html

Following are the issues:

  1. Only Python code is available for this problem. I would like to add C++ code as well and add its tag at the top.
    image

  2. The title has been mistyped as Adding One to Number instead of Maximum Absolute Difference
    image

  3. The four cases are not at all clear.
    image

  4. There is error in Python code.
    image

Please assign this issue to me, would like to work on them.

Add Questions on String

As this project aims to build a website which will contain the codes along with the techniques and explanations so that it can be helpful for students preparing for an interview and. The string is one of the important topics for interview preparation, so I want to add questions of String.

@Abhijit2505 Sir,Please assign me this issue under SWOC.

One Dimensional Array -> First Missing Integer : Add C++ optimisation; and fix some bugs

Hello @Abhijit2505 !
I am Samrendra, a Participant of SWOC'21. I have found a few issues on the page - First Missing Integer in the section One Dimensional Array and would like to work on them.
Link to the page - https://abhijit2505.github.io/Algorithmic-Treasure-Site/Pages/Array/firstMissingInt.html

Following are the issues:
1. The current C++ code sorts the vector using stl::sort(); this has an amortized time complexity of O(nlogn), but the given algorithm is wrongly marked as an O(n) time complexity. This needs to be corrected.
image
2. The current C++ code can be further optimised to reach the required O(n) time and O(1) space complexity by using swapping of elements. I would like to provide that code too.
3. There is no explanation of test cases provided. I would like to provide explained sample input and sample output.

Please assign this issue to me, would like to work on them.

Reverse a linked list

Input:
LinkedList: 1->2->3->4->5->6
Output: 6 5 4 3 2 1

Asked In: Accolite, Adobe, Amazon, Cisco, Cognizant, D-E-Shaw, and many more.

Participated Opensource Programs Section

Screenshot (42)

Under the Dark theme, the current BWLU(Build With LetsUpgrade) [July,20 - Sept,20] Logo is not visible, and also I am trying to add SWoC also in the 'Participated Opensource Programs section' with its logo which is mentioned below.
1.BWLU
Build with lets upgrade

2.SWoC
SWOC

Binary Tree : Nodes without sibling

For a given Binary Tree of type integer, print all the nodes without any siblings.

The first and the only line of input will contain the node data, all separated by a single space. Since -1 is used as an indication of whether the left or right node data exist for root, it will not be a part of the node data.

Input Sample

2 4 5 6 -1 -1 7 20 30 80 90 -1 8 9 -1 -1 -1 -1 -1 -1 -1 -1 -1

Output Sample

6 8 7 9

image

Anagrams in python and C++

Definition

A word w is an anagram of a word v if a permutation of the letters transforming w
into v exists. Given a set of n words of length at most k, we would like to detect all
possible anagrams.

  • input: below the car is a rat drinking cider and bending its elbow while this thing
    is an arc that can act like a cat which cried during the night caused by pain in its
    bowel
  • output: {bowel below elbow}, {arc car}, {night thing}, {cried cider}, {act cat}

I can implement this in python and C++

Please assign me this issue under SWOC

Each click opens a new window tab

Issue-
On Each Click a new tab opens up which ends up opening too many tabs and causes confusion.

Solution-
The new page should open up on the tab and on pressing back button it should navigate back to previous page.

I would like too work on this issue under SWOC2021, so please it would be huge help if you could assign this issue to me.
Thank You.

Few Writing Mistakes in the documentation page.

-The p of problem statement on the left sidebar should be capital.
-Similarly h of hashmaps.
-In the footer it is written "We welcome every C++ & python lover to come forwards " , forwads should be corrected to forward and "Keep coding, keep loving python & ++", ++ should be corrected to C++.

image
image

I would like to work on this issue . Please assign me for the same.

Improving documentation section

Description -
The buttons in the documentation section can be aligned and by hovering on them we can give some brief info. For example on hovering one-dimensional array, we can add what a one-dimensional array is. Else the second idea could be to make two buttons for which one button will give the info and the second will redirect to problems.

@Abhijit2505 I am a participant in SWOC. I would like to work on this issue if you liked this idea. Kindly assign this to me.

Dijkstra's algorithm

Adding Dijkstra's algorithm in the graph section which is an algorithm for finding the shortest paths between nodes in a graph.

Each click opens a new window tab

Issue-
On Each Click a new tab opens up which ends up opening too many tabs and causes confusion.

Solution-
The new page should open up on the tab and on pressing back button it should navigate back to previous page.

I would like too work on this issue under SWOC2021, so please it would be huge help if you could assign this issue to me.
Thank You.

Kruskal's algorithm

Description -
Adding Kruskal's Algorithm in the graph section which is used to find the minimum cost spanning tree.

@Abhijit2505 Please assign me this issue under SWOC.

Dynamic Programming algorithms

I would like to work on dynamic programming algorithms. I can provide all the important algorithms such as knapsack, coin change, staircase, etc. Please assign this issue to me as a SWOC 2021 participant.

Page redirected to the same page

@Abhijit2505 From SWOC2021, As I was visiting the webpage I found we do not have programs for 1> Mathematic problems, 2>Hashmap and 3> OOP design.

I want to work on these topics. If we can discuss, do let me know how can I get going to add interesting program for above mentioned topics

Implementation of important algorithms using stack data structure in python

stacks are important data structure and there are a few examples of stack implementation in the repo. Let me update the repo with the same .so please assign me the issue. some important stack implemetations include 2stack implementation, The celebrity problem,arithmetic expression evaluation etc. I am a participant in swoc21

Modifying the content redirection of the buttons in documentation

In the documentation, on clicking the button of the problem section, there can be two options- info and problems. For example - on clicking the Linked List button, two options will be popped. The first one is information about the Linked list and the second is about the actual redirection to the problems page.

Sorted insert for circular linked list

There will be given a sorted circular linked list, the task is to insert a new node in this circular list so that it remains a sorted circular linked list.

Input:
LinkedList = 1->2->4
(the first and last node is connected, 4 --> 1)
data = 2
Output: 1 2 2 4

3 CYCLE QUESTION

THIS IS VERY IMPORTANT QUESTION IN INTERVIEW WHICH IS SOLVED BY USING GRAPH DATA STRUCTURE.

Max data node in Generic tree.

#Given a generic tree, find and return the node with maximum data. You need to return the node which is having maximum data.
Return null if the tree is empty.

Input format :
The first line of input contains data of the nodes of the tree in level order form. The order is: data for root node, number of children to root node, data of each of child nodes, and so on and so forth for each node. The data of the nodes of the tree is separated by space.
Output Format :
The first and only line of output contains the data of the node with the largest data in the given tree.
Constraints:
Time Limit: 1 sec
Sample Input 1:
10 3 20 30 40 2 40 50 0 0 0 0
Sample Output 1:
50

I would want to work on this issue for SWOC and would want to implement this in CPP.

Maximal Boundaries—Knuth–Morris–Pratt

Input: abracadabra
Output: abra abra

An important classic problem on character strings is the detection of occurrences
of a pattern t in a string s. The Knuth–Morris–Pratt algorithm solves this problem
in optimal linear time O(|t| + |s|)

I would want to work on this issue for SWOC and would want to implement this in python.

adding different algorithms

can i add a different code snippets related to strings and also different sorting and searching algorithms

And can i work this for swoc?

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.