-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
my issue #663
Open
anshita0911
wants to merge
17
commits into
GeeksforGeeks-VIT-Bhopal:main
Choose a base branch
from
anshita0911:655
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
my issue #663
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4eac979
readme by anshita
anshita0911 4477b85
cpp file by anshita
anshita0911 d21c789
Create anshi
anshita0911 acc55d5
Add files via upload
anshita0911 9035339
Create deleteit
anshita0911 b6894a4
Add files via upload
anshita0911 6cd585c
Delete deleteit
anshita0911 6cb4570
Create codes
anshita0911 c1ed1bf
Add files via upload
anshita0911 509b977
Create codes
anshita0911 111e6fc
Add files via upload
anshita0911 57d6b42
Create create
anshita0911 5ebe7fc
Add files via upload
anshita0911 bc91162
Update README.md
anshita0911 ffe2aea
Update README.md
anshita0911 ac1aa0c
Rename readme.md to readme1111.md
anshita0911 a649bfe
issue
anshita0911 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// { Driver Code Starts | ||
#include<bits/stdc++.h> | ||
using namespace std; | ||
|
||
|
||
// } Driver Code Ends | ||
// Function to return minimum number of jumps to end of array | ||
int minJumps(int arr[], int n){ | ||
// Your code here | ||
} | ||
|
||
|
||
// { Driver Code Starts. | ||
|
||
int main() | ||
{ | ||
int t; | ||
cin>>t; | ||
while(t--) | ||
{ | ||
int n,i,j; | ||
cin>>n; | ||
int arr[n]; | ||
for(int i=0; i<n; i++) | ||
cin>>arr[i]; | ||
|
||
cout<<minJumps(arr, n)<<endl; | ||
} | ||
return 0; | ||
} | ||
// } Driver Code Ends |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
|
||
Time complexity: O(N^2) | ||
Space complexity: O(1) | ||
|
||
where �N� is the length of the given string �s�. | ||
|
||
|
||
*/ | ||
|
||
bool checkUnique(string &s) | ||
{ | ||
// Iterate through the given string 's'. | ||
for (int i = 0; i < s.length(); i++) | ||
{ | ||
// Again, Iterate through the given string. | ||
for (int j = i + 1; j < s.length(); j++) | ||
{ | ||
// If, found same character at different indexed then return false. | ||
if (s[i] == s[j]) | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* | ||
Time Complexity: O(N*M). | ||
Space Complexity: O(N*M). | ||
|
||
Where N is the length of the string a and M is the length of string b. | ||
*/ | ||
|
||
#include <vector> | ||
#include <string> | ||
|
||
bool isInterleave(string a, string b, string c) | ||
{ | ||
|
||
int n1 = a.length(), n2 = b.length(), n3 = c.length(); | ||
|
||
//Create a dp array of size (n1+1)*(n2+1) and initialise it to false. | ||
vector<vector<bool>> dp(n1 + 1, vector<bool>(n2 + 1, false)); | ||
|
||
//If the length of c is not equal to the sum of the length of a and b, then return false. | ||
if (n1 + n2 != n3) | ||
{ | ||
return false; | ||
} | ||
int i, j; | ||
|
||
for (i = 0; i <= n1; i++) | ||
{ | ||
for (j = 0; j <= n2; j++) | ||
{ | ||
|
||
//If both i and j are 0, then simply asnwer is true. | ||
if (i == 0 && j == 0) | ||
{ | ||
dp[i][j] = true; | ||
} | ||
|
||
//If the value of� | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* | ||
Time Complexity : O(N^3) | ||
Space complexity : O(1) | ||
|
||
where N is the size of the input string | ||
*/ | ||
|
||
bool isPalindrome(string &str, int start, int end) | ||
{ | ||
while (start < end) | ||
{ | ||
if(str[start] != str[end]) | ||
{ | ||
return false; | ||
} | ||
|
||
++start; | ||
--end; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
int palindromicSubstrings(string str) | ||
{ | ||
int n = str.length(); | ||
int ans = 0; | ||
|
||
for (int i = 0; i < n; ++i) | ||
{ | ||
for (int j = i; j < n; ++j) | ||
{ | ||
if(isPalindrome(str, i, j)) | ||
{ | ||
++ans; | ||
} | ||
} | ||
} | ||
|
||
return ans; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
##readme | ||
|
||
|
||
|
||
|
||
name: anshita banthia | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can just use |
||
|
||
|
||
registration number: 20BCE10425 | ||
|
||
|
||
|
||
i am anshita banthia cyrrently pursuing btech in computer science from vit university. | ||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide space between # and some texts to get a title in readme file