Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions All Other Program/Q3.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import java.util.Scanner;


class Q3
{
public static void main(String args[])
{
int a,b,c;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the First Number : ");
a = sc.nextInt();
System.out.println("Enter the Second Number : ");
b = sc.nextInt();
System.out.println("Enter the Third Number : ");
c = sc.nextInt();
if(a>b && a>c)
{
System.out.println(a+" is the Biggest Number");
}
else if(b>a && b>c)
{
System.out.println(b+" is the Biggest Number");
}
else
{
System.out.println(c+" is the Biggest Number");
}

}

}
16 changes: 16 additions & 0 deletions C++ Programs/Greedy/135-Candy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class Solution {
public:
int candy(vector<int>& ratings) {
int sum =0;
vector<int> c (ratings.size(), 1);
for (int i=1;i<ratings.size();i++)
if(ratings[i]>ratings[i-1])
c[i] = c[i-1]+1;

for(int i=ratings.size()-2;~i;i--)
if(ratings[i]>ratings[i+1]) c[i] = max(c[i], c[i+1]+1);

for(auto i: c) sum +=i;
return sum;
}
};
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-NO LONGER ACCEPTING ANY MORE PULL REQUEST! THANK YOU FOR PARTICIPATING-

# Hacktoberfest 2022

## How to Participate?
Expand Down