diff --git a/README.md b/README.md index 7e32844c5..5d4097c10 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ Geek Week: Local is a week-long hackathon of creating hacks, solving problems, a ## What are these Challenges? Geek Week: Local will run from 14/03/21 to 21/03/21. -During this time, you can expect challenges for all skill levels. These challenges can be completed on your own time, and new ones will be released each day on our website! Once the daily challenges are announced, you’ll have 24 hours to complete and submit them in order to -earn those points on the leader-board. +During this time, you can expect challenges for all skill levels. These challenges can be completed on your own time, and new ones will be released each day on our website! Once the daily challenges are announced, you’ll have 24 hours to complete and submit them in order to earn those points on the leader-board. If the daily challenges aren’t quite your speed, there will also be plenty of week-long challenges you can complete at any time. These will range from quick technical challenges to tasks you can complete with your guild-mates (guild=team), both beginner-friendly and technically advanced so there is something for everyone. diff --git a/anshita.cpp b/anshita.cpp new file mode 100644 index 000000000..99c5b4663 --- /dev/null +++ b/anshita.cpp @@ -0,0 +1,31 @@ +// { Driver Code Starts +#include +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>arr[i]; + + cout< +#include + +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> dp(n1 + 1, vector(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; +} + diff --git a/readme1111.md b/readme1111.md new file mode 100644 index 000000000..90fd7cef7 --- /dev/null +++ b/readme1111.md @@ -0,0 +1,18 @@ +##readme + + + + +name: anshita banthia + + + + +registration number: 20BCE10425 + + + +i am anshita banthia cyrrently pursuing btech in computer science from vit university. + + +