Binary Search in Python (CBSE | CS | XI & XII)
#Binary Search a=[5,7,11,13,16,19,23,27,30,34,38,40,41,42,45] n=len(a) beg=0 last=n-1 print(a) srch=int(input('Enter the number to searc...
#Binary Search a=[5,7,11,13,16,19,23,27,30,34,38,40,41,42,45] n=len(a) beg=0 last=n-1 print(a) srch=int(input('Enter the number to searc...
Click here to download all the Java Programs
//Randomly Generate Sorted Array #include<iostream> #include<iomanip> #include<time.h> #include<stdlib.h> using name...
//Binary Search in 1D Array #include<iostream> #include<iomanip> #include<time.h> #include<stdlib.h> using namespace...
//Various 7-Patterns Layout #include<stdio.h> //Global Variables int i, j, k, n=5, a; char x; void Pattern1_1(){ for(i=1;i<=n;...
class Room { float length, width, height; byte nWindows; void setAttr (float l, float w, float h, byte n) { length=l; width=w;...
#include<stdio.h> int main() { int arr[30]={8,10,13,18,20,21,25,34,41,47}; int n=10,i,nvalue,index,j,pos; //printing the actua...
class nestedLoopDemo { public static void main(String args[]) { int n, flag, i, j; n=100; j=2; System.out.println("The...
class breakDemo { public static void main(String args[]) { int i, n=10; for(i=1;i<=n;i++) { if(i==5) continue; ...
class whileLoopDemo{ public static void main(String args[]) { int i=11, n=5; while(i<=n) { System.out.println(i); i+...
//Generate Unique Random Values and Store in Array. #include<iostream> #include<iomanip> #include<time.h> #include<st...
// Program-1 public class DemoIf { public static void main(String args[]) { int marks; String result; marks=20; if(marks>...
Download the File. Click here to Watch the Explanation & Developing Video