GithubHelp home page GithubHelp logo

itsanshulverma / du-cs-undergrad-course Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 10.0 168.32 MB

Companion repo to store codes, assignments for B.Sc. (Hons) Computer Science Course (2019-2022) by University of Delhi

C++ 7.49% Java 1.94% Assembly 0.25% C 12.46% Lex 0.16% Yacc 0.01% HTML 62.81% JavaScript 0.03% Jupyter Notebook 13.95% Python 0.58% Prolog 0.32%
android assembly computer-science cpp du html-css-javascript java lex prolog python r undergraduate-course yacc

du-cs-undergrad-course's Introduction

Anshul's Twitter Anshul's LinkedIn Anshul's Instagram

hi thereπŸ‘‹, I am Anshul Verma

πŸ‘¨β€πŸ’» A coder/programmer/developer who likes JavaScript a lot.

πŸ‘¨β€πŸŽ“ Currently pursuing MBA from Indian Institute of Management, Lucknow (Class of 2025).
πŸ‘¨β€πŸŽ“ Computer Science and Mathematics Graduate from the University of Delhi (Class of 2022).

πŸ‘‰ Website

ask me about πŸ“’

mba, cat, tech, web development, data, mathematics, gadgets, movies or anything new. I would love to connect and learn things.

technologies πŸ‘¨β€πŸ’»

|languages|

C C++ Python Java JavaScript Typescript

Bash SQL HTML CSS

|web|

Node.js Express.js Socket.io Axios Webpack Babel

React React Router Redux | Vue.js Vue Router Vuex Pinia

Bootstrap D3.js SaSS

|ml, maths & data science|

Pandas NumPy Matplotlib scikit-learn Jupyter Notebook

matlab R Maxima Octave

|databases|

Firebase MySQL MongoDB SQLite3

|apps|

Figma Adobe Illustrator Inkscape

Microsoft Excel Microsoft PowerPoint Microsoft Word

|other tools|

Git npm pip Windows Terminal

|os|

Ubuntu Windows

|mobile development|

Android

|editors/ide|

VSCode Android Studio NetBeans IDE

Replit CodePen

πŸ“ˆ github stats

GitHub Streak

du-cs-undergrad-course's People

Contributors

imgbotapp avatar itsanshulverma avatar

Stargazers

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

Watchers

 avatar  avatar

du-cs-undergrad-course's Issues

permute

#include

using namespace std;

void swap(int& a, int& b) {
int temp = a;
a = b;
b = temp;
}

void generatePermutations(int* nums, bool* used, int* perm, int size, int index, bool allowRepetition) {
if (index == size) {
for (int i = 0; i < size; i++) {
cout << perm[i] << " ";
}
cout << endl;
return;
}

for (int i = 0; i < size; i++) {
    if (!allowRepetition && i > 0 && nums[i] == nums[i - 1] && !used[i - 1])
        continue;

    if (!used[i]) {
        used[i] = true;
        perm[index] = nums[i];
        generatePermutations(nums, used, perm, size, index + 1, allowRepetition);
        used[i] = false;
    }
}

}

void permute(int* nums, int size, bool allowRepetition) {
bool* used = new bool[size];
int* perm = new int[size];

for (int i = 0; i < size; i++)
    used[i] = false;

generatePermutations(nums, used, perm, size, 0, allowRepetition);

delete[] used;
delete[] perm;

}

int main() {
int size;
cout << "Enter the number of elements: ";
cin >> size;

int* nums = new int[size];
cout << "Enter the elements: ";
for (int i = 0; i < size; i++) {
    cin >> nums[i];
}

bool allowRepetition;
cout << "Allow repetition? (1 for yes, 0 for no): ";
cin >> allowRepetition;

permute(nums, size, allowRepetition);

delete[] nums;

Β Β Β Β 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.