Skip to main content

Posts

Showing posts from August, 2019

How to Run "Hello World" on Your Android Studio As a Beginner|| Android ...

Linear Search!!

Linear Search Algorithm!!  What is it? It just a simple method to find out a given number into our given array or not? First of all, let's take a function called search(){} okay? Second is our Main Function(){}? Now, We know everything from the beginning of the Question, Just you need to implement it into your code. One more point to understand this code: here -1 Means out of our boundary / or Doesn't exit #include <iostream> using namespace std; //Now it's our  search function //passing through this function is parameter  given array[] it's given in the main function //if the size of the array given, then replace n to a given size // and passing int x=? where justifying is the number exists in our given array or not  int search (int arr[], int n, int x) { int i; for(i=0;i<n;i++) if (arr[i]==x) return i; return -1; // i already told about this minus means // this whole function is returning index value i or -1 } int main(void){ ...

JAVA FINAL PROJECT DEMO USING NETBEANS IDE || XAMPP SERVER

363B Codeforces

There is a fence in front of Polycarpus's home. The fence consists of n planks of the same width which go one after another from left to right. The height of the i-th plank is hi meters, distinct planks can have distinct heights. Polycarpus has bought a posh piano and is thinking about how to get it into the house. In order to carry out his plan, he needs to take exactly k consecutive planks from the fence. Higher planks are harder to tear off the fence, so Polycarpus wants to find such k consecutive planks that the sum of their heights is minimal possible. Write the program that finds the indexes of k consecutive planks with minimal total height. Pay attention, the fence is not around Polycarpus's home, it is in front of home (in other words, the fence isn't cyclic). dynamic Programming পলিকার্পাসের বাড়ির সামনে একটি বেড়া রয়েছে। বেষ্টনীতে একই প্রস্থের n তক্তা রয়েছে যা বাম থেকে ডানে একের পর এক চলে । i-তম তক্তার উচ্চতা h1 মিটার, পৃথক তক্তাগুলির স্বতন্ত্র উ...