Code Monkey home page Code Monkey logo

c's People

Contributors

abhi1998das avatar abranhe avatar akash-21-verma avatar akashmodak97 avatar aliex-dev avatar alyssoncs avatar aoranthe avatar archit099 avatar ayswarya141 avatar bhaskarsrinivask avatar bpsingh10 avatar dipu007 avatar dp981 avatar gauravsingh9356 avatar kirtish16 avatar lapy113 avatar mritunjay7065 avatar natanel-ziv avatar nikhildhyani avatar pmba avatar pratikkumar24 avatar satyajitghana avatar sendjasni avatar setn4me avatar triptipaliwal2000 avatar tusharkanakagiri avatar victorg-028 avatar vipul662 avatar vishnu-m avatar yandrade1305 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  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

c's Issues

Learning c language

I have to write a program to print two
Salaries one as the basic and the other with bonus according to the days if he had worked for days above 25 he'll get bonus other wise he'll not and the one who get bonus will get 1000 per day for each day starting from 25 to the day till 31 like if he came 26 days he'll get 1000 bonus and if 27 he'll get 2000 and so on till 31

The user will input the basic salary and the days which he worked

Outstanding Pull Requests

There are 9 outstanding pull requests. Can they please be reviewed and merged in a timely manner?

Typo in README.md

This issue is: A typo error in README.md

  • A new Algorithm
  • An update to an existing algorithm.
  • An error found
  • A proposal
  • A question
  • Other (Describe below*)

Description:

There was a typo in README.md (Should be "searching" instead of "serching").

Hello

I'm a student and I wish to start learning c

Egg Dropping Problem

It's a famous and interesting question on dynamic programming , I think adding it to this repo will be good

Pointers in Array

I stuck into this topic from last one and half months..can any1 explain it here in simple order.. vthout makin things complicated. 🤧

Do you any algorithm on C?

Hi, everyone!

Do you know any algorithm implementation in any language, that you wanna share with us?

Open a pull request in any of the programming languages available, or in C this case

Data structures

Please find out the errors and tell me it's urgent.

#include <stdio.h>
#include <string.h>

#define MAX_STUDENTS 50

// Structure for student data
struct Student {
int regNo;
char name[50];
char branch[50];
float cgpa;
};

// Linear search function to find a student by registration number
void linearSearch(struct Student students[], int size, int regNo) {
int found = 0;

for (int i = 0; i < size; i++) {
    if (students[i].regNo == regNo) {
        printf("Student found:\n");
        printf("Reg No: %d\n", students[i].regNo);
        printf("Name: %s\n", students[i].name);
        printf("Branch: %s\n", students[i].branch);
        printf("CGPA: %.2f\n", students[i].cgpa);

        found = 1;
        break;
    }
}

if (!found) {
    printf("Student not found!\n");
}

}

// Bubble sort function to arrange students data by registration number
void bubbleSort(struct Student students[], int size) {
for (int i = 0; i < size - 1; i++) {
for (int j = 0; j < size - i - 1; j++) {
if (students[j].regNo > students[j + 1].regNo) {
// Swap students
struct Student temp = students[j];
students[j] = students[j + 1];
students[j + 1] = temp;
}
}
}
}

// Binary search function to find a student by registration number (requires data to be sorted)
void binarySearch(struct Student students[], int size, int regNo) {
int left = 0;
int right = size - 1;
int found = 0;

while (left <= right) {
    int mid = left + (right - left) / 2;

    if (students[mid].regNo == regNo) {
        printf("Student found:\n");
        printf("Reg No: %d\n", students[mid].regNo);
        printf("Name: %s\n", students[mid].name);
        printf("Branch: %s\n", students[mid].branch);
        printf("CGPA: %.2f\n", students[mid].cgpa);

        found = 1;
        break;
    }
    else if (students[mid].regNo < regNo) {
        left = mid + 1;
    }
    else {
        right = mid - 1;
    }
}

if (!found) {
    printf("Student not found!\n");
}

}

// Insertion sort function to arrange students data by CGPA in descending order
void insertionSort(struct Student students[], int size) {
for (int i = 1; i < size; i++) {
struct Student key = students[i];
int j = i - 1;

    while (j >= 0 && students[j].cgpa < key.cgpa) {
        students[j + 1] = students[j];
        j = j - 1;
    }

    students[j + 1] = key;
}

}

int main() {
struct Student students[MAX_STUDENTS] = {
{ 1001, "John", "Computer Science", 8.5 },
// Add remaining student data
// ...
};

int regNoToSearch = 1003;

// Linear search
linearSearch(students, MAX_STUDENTS, regNoToSearch);

// Bubble sort by registration number
bubbleSort(students, MAX_STUDENTS);

// Binary search after sorting
binarySearch(students, MAX_STUDENTS, regNoToSearch);

// Insertion sort by CGPA in descending order
insertionSort(students, MAX_STUDENTS);

return 0;

}

Creating a library out of this project

Thanks for anyone contributing to this project. It's been a huge the amount of work, and many, many algorithms over the pass year. I would like to start converting the All ▲lgorithms Project to a library to make it more useful and even more reusable.

We could have all the algorithms inside an /algorithms folder and keep start creating an evaluating the algorithm on the library from those algorithms already implemented. I know its a huge work but we can accomplish it together.

We will use clib a package manager for C developers. I will be more flexible on pull request right now to let people contribute on the project, and also remove some outgoing PRs, but eventually they will be as mentioned earlier on the /algorithms folder.

So have an amazing 2020 folks!

Do you know any algorithm in C?

Hi, everyone!

Do you know any algorithm implementation in any language, that you wanna share with us?

Open a pull request in any of the programming languages available, or in C this case

New to c

I have to write a program to print two
Salaries one as the basic and the other with bonus according to the days if he had worked for days above 25 he'll get bonus other wise he'll not and the one who get bonus will get 1000 per day for each day starting from 25 to the day till 31 like if he came 26 days he'll get 1000 bonus and if 27 he'll get 2000 and so on till 31

The user will input the basic salary and the days which he worked

Add next permutation in C

I am creating an issue because the next permutation function in cpp can be easily made using built-in functions, but in c, it is not so easy. So I want to add this new algorithm here for this question :
https://leetcode.com/problems/next-permutation/
I want to make this contribution under Hacktoberfest'22.
And I will include this file in strings directory.

Algorithms pertaining to operating system should be added

Algorithms pertaining to operating system are very much a core part of all algorithms that any person dealing with computer science and programming should have an idea about.

Algorithms for process scheduling(like fcfs etc), disk scheduling(like scan), deadlock avoidance(like bankers) should also be implemented.

Limit in binary to decimal conversion

This issue is:

  • A new Algorithm
  • An update to an existing algorithm.
  • [x ] An error found
  • A proposal
  • A question
  • Other (Describe below*)

Description:

Adding Floyd Warshall Algorithm

This issue is:

  • A new Algorithm
  • An update to an existing algorithm.
  • An error found
  • A proposal
  • A question
  • Other (Describe below*)

Description:

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.