Giter VIP home page Giter VIP logo

adityanjr / code-ds-algo Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 46.0 112.38 MB

👨‍💻 Collection of algorithm and data structure codes, and competitive programming.

License: MIT License

C++ 87.46% Java 9.89% Python 2.05% C 0.43% Erlang 0.02% JavaScript 0.11% Scala 0.02% CSS 0.01% HTML 0.01% Kotlin 0.01% GLSL 0.01%
algorithm awesome codes coding competitive-programming cpp data-structures hacktoberfest interview

code-ds-algo's Introduction

adityanjr

npx adityanjr #npm-card
const user = {
  name: "Aditya Singh",
  theme: [ "one dark", "github dark" ],
  
  line_endings: "crlf",
  codeStyle: "Prettier",
  variables: "camelCase",
  trailing_comma: true,
    
  hobbies: [ "programming", "chess", "gaming", "anime", "gaining knowledge", ],
  languages: [ "C++", "Python", "JavaScript", "Solidity", "Dart" ],
  editors: [ "Android Studio", "VS Code", "Sublime" ],
  
  newLanguage: function () {
    console.log("Namaste, World!")
  },
  
  hereIsYourGame: function (game) {
    const good = [ "FPS", "Competitive", "AAA" ]
    const acceptable = JSON.parse(fs.readFileSync("acceptablegames.json"))
    
    if (good.includes(game)) {
      console.log("Ready! Shoot! Win!")
    } else {
      console.log("No, thanks.")
    }
  },
}

About Me

Github

  • Name: Aditya | Singh
  • Nationality: Indian
  • Loves: coding and gaming -///-
  • Gender: he/him/Male
  • Hobbys: Tech Stuff, Graphics Design, Chess
  • Working @: Walnut
  • Mail: [email protected]

  •  

                  


    Skills & Tools



    💻  Main Tech Knowledge

    Java  JSF  Primefaces  Angular  Spring  Hibernate 
    Flutter   GetX   BLoC   MobX   Dart  
    HTML5  CSS3  JavaScript  TypeScript 
    Git  GitHub  GitLab  Docker  Ansible  SonarQube 
    Postgres MySQL SQLite
    Ant  Maven  Gradle  REST API  GRAPHQL 
    LINUX VSCode  Eclipse  IntelliJ 
    Clean Architecture  Hexagonal Architecture  MVC Architecture  MVVM Architecture 
    DDD  TDD  PMBOK  SCRUM 

    🧠  Others, Always Learning

    Kotlin  Firebase  NestJS  NodeJS 
    Redis  Nginx  GRPC  Kafka 
    Kubernetes  Puppet  GithubActions 
    GCP  AWS  Oracle 
    Onion Architecture  BDD  MongoDB  Python 
    Cpp  Arduino  JQuery  JSP  SASS  PHP 
    PHOTOSHOP  XD  ILLUSTRATOR 
    Blockchain  Cryptocurrencies  Bitcoin  Ethereum 

    ⚙️  GitHub Stats



    code-ds-algo's People

    Contributors

    aditya-njr avatar adityadtu avatar championalpha avatar coder30-lab avatar deepg25 avatar freckles30 avatar harshmauny avatar imgbotapp avatar infamousbolt avatar ishita4m avatar itsharshitb avatar karansoni158 avatar kavita121 avatar letscodedev avatar meet619 avatar merwinsamuel avatar nishasingla1 avatar p1yush avatar prachikapatel avatar random1001guy avatar rishabh-jain14 avatar rj025 avatar saurabhsingh76 avatar shatabdi764 avatar shauryachaubey avatar shivajipotnuru avatar srdewan avatar swetasahoo29 avatar swoyamsss avatar vohraraghav22032000 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

    Watchers

     avatar  avatar

    code-ds-algo's Issues

    Some addition and enhancement on the DS-Algo Notes

    Hi @adityanjr,

    I was just going through DS-Algo Notes folder, and I must say, It is a very good effort. But I think some concepts need more explanation and enhancement. I also believe that explaining the actual code through pseudocode might be very efficient.

    Please let me know what do you think about that. If your thoughts align with mine, I would like to work on it.

    Algorithms

    #include
    #include <math.h>
    using namespace std;
    int heapSize;

    void buildMaxHeap(int[],int);

    void maxHeapify(int ptr[], int i, int s)
    {
    int l = 2i + 1;
    int r = 2
    i + 2;
    int largest = i;
    if((ptr[l]>ptr[largest]) && l<s)
    largest = l;

    if((ptr[r]>ptr[largest]) && r<s)
        largest = r;
    
    if(largest != i)
    {
        swap(ptr[i], ptr[largest]);
        maxHeapify(ptr, largest, s);
    }
    

    }

    void buildMaxHeap(int ptr[], int s)
    {
    for(int i=(s/2)-1; i>=0; i--)
    maxHeapify(ptr, i, s);

    for (int i=s-1; i>=0; i--)
    {
    	swap(ptr[0], ptr[i]);
    	maxHeapify(ptr, 0, i);
    }
    

    }

    void heapSort(int ptr[], int s)
    {
    buildMaxHeap(ptr, s);
    }

    int main()
    {
    int * ptr, n;
    cout << "Enter the size of the Array: ";
    cin >> n;
    ptr = new int[n];
    if(ptr == NULL)
    {
    cout << "Insufficient Memory.";
    }
    cout<< "Enter the elements:\n";
    for(int i=0; i<n; i++)
    {
    cout<<"["<<i<<"]:";
    cin >> ptr[i];
    }
    heapSort(ptr, n);
    cout << "\nSorted Array: \n";
    for(int i=0; i<n; i++)
    {
    cout << ptr[i] << " ";
    }
    return 0;
    }

    Host

    #include
    #include <math.h>
    using namespace std;
    int heapSize;

    void buildMaxHeap(int[],int);

    void maxHeapify(int ptr[], int i, int s)
    {
    int l = 2i + 1;
    int r = 2
    i + 2;
    int largest = i;
    if((ptr[l]>ptr[largest]) && l<s)
    largest = l;

    if((ptr[r]>ptr[largest]) && r<s)
        largest = r;
    
    if(largest != i)
    {
        swap(ptr[i], ptr[largest]);
        maxHeapify(ptr, largest, s);
    }
    

    }

    void buildMaxHeap(int ptr[], int s)
    {
    for(int i=(s/2)-1; i>=0; i--)
    maxHeapify(ptr, i, s);

    for (int i=s-1; i>=0; i--)
    {
    	swap(ptr[0], ptr[i]);
    	maxHeapify(ptr, 0, i);
    }
    

    }

    void heapSort(int ptr[], int s)
    {
    buildMaxHeap(ptr, s);
    }

    int main()
    {
    int * ptr, n;
    cout << "Enter the size of the Array: ";
    cin >> n;
    ptr = new int[n];
    if(ptr == NULL)
    {
    cout << "Insufficient Memory.";
    }
    cout<< "Enter the elements:\n";
    for(int i=0; i<n; i++)
    {
    cout<<"["<<i<<"]:";
    cin >> ptr[i];
    }
    heapSort(ptr, n);
    cout << "\nSorted Array: \n";
    for(int i=0; i<n; i++)
    {
    cout << ptr[i] << " ";
    }
    return 0;
    }

    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.