├── .github └── workflows │ └── python-publish.yml ├── Balanced Parenthesis.c ├── Binarysearch.cpp ├── Blockchain └── readme.text ├── Bruhtask-app ├── Assets │ ├── Svg │ │ ├── Hero.svg │ │ ├── todo.svg │ │ └── waves.svg │ ├── images │ │ └── logo.png │ └── styles │ │ ├── about.css │ │ └── style.css ├── README.md ├── about.html ├── app.js └── index.html ├── BubbleSort.cpp ├── C++ ├── 1D prefix sum .cpp ├── 2D prefix sum.cpp ├── 3Sum.cpp ├── AdvancedPattern.cpp ├── Armstrong_no.cpp ├── Arrays │ ├── Game with Nos │ ├── Merge_Two_Sorted_Arrays.cpp │ ├── Monotoni_Array.cpp │ ├── Rotate Array │ ├── Running Sum │ ├── Sum of an array │ ├── Wave Array │ ├── count 0's │ ├── largest value │ ├── play with Or │ ├── sort array 0s , 1s and 2s │ ├── sort array 0s and 1s │ └── swap values ├── BFS.cpp ├── BInaryTreeMaximumPathSum.cpp ├── Basic │ ├── Diamond_pattern.cpp │ ├── Find_sum_of_given_series.cpp │ ├── Root_of_number.cpp │ ├── floydstriangle.cpp │ ├── hollowdiamond.cpp │ ├── ifelse.cpp │ ├── inverted.cpp │ ├── numberpyramid.cpp │ ├── pascalstriangle.cpp │ ├── pattern1.cpp │ ├── pattern2.cpp │ ├── pow_of_no.cpp │ ├── rhombus.cpp │ ├── sum_of_odd_and_even.cpp │ └── zigzag.cpp ├── Billing systems ├── Bubble sort ques │ ├── Bubble sort ques.cbp │ ├── Bubble sort ques.depend │ ├── Bubble sort ques.layout │ ├── bin │ │ └── Debug │ │ │ └── Bubble sort ques │ ├── main.cpp │ └── obj │ │ └── Debug │ │ └── main.o ├── BubbleSort.cpp ├── Bucket sort ├── C++.txt ├── ComputeLCMof2Numbers ├── Count_inversion.cpp ├── DFS.cpp ├── Delete_Tree.cpp ├── ExponentialSearch.cpp ├── Find Missing Element.cpp ├── Find_k-th_smallest_element_in_BST.cpp ├── Flattering_of_Linked_List ├── Function_Using_LinkedList.cpp ├── HeapSort.cpp ├── Height _of_tree.cpp ├── Jump_game.cpp ├── Pascals triangle using c++ ├── PowerSet.cpp ├── QuickSort.cpp ├── README.md ├── RatInMaze.cpp ├── Search_2D_Matrix.cpp ├── Sorting │ ├── Bubble_sort.cpp │ ├── Insertion_sort.cpp │ ├── WaveSort.cpp │ ├── bubble_sort.cpp │ ├── insertion_sort.cpp │ └── selectionsort.cpp ├── SpiralMatrix.cpp ├── Stack_using_LinkedList.cpp ├── Stickler_theif.cpp ├── StringPalindrome ├── TernarySearch.cpp ├── Unit_conversion.cpp ├── ValidParenthesis.cpp ├── Valid_Parenthesis.cpp ├── ascending array.cpp ├── atmmachineprogram.cpp ├── balanced_binary_tree.cpp ├── binary search tree searching.cpp ├── binary search │ ├── bin │ │ └── Debug │ │ │ └── binary search │ ├── binary search.cbp │ ├── binary search.layout │ ├── main.cpp │ └── obj │ │ └── Debug │ │ └── main.o ├── binarySearch.cpp ├── binarytodecimal.cpp ├── bubblesort.cpp ├── bucketsort.cpp ├── code1.txt ├── codesforces1009B.cpp ├── combsort.cpp ├── count_inversions.cpp ├── cyclicsort.cpp ├── decimaltobinary.cpp ├── dijsktra's algorithm ├── duplicate.cpp ├── even odd.cpp ├── factorial.cpp ├── find_circuilar_tour.cpp ├── floyds triangle.cpp ├── gfg.cpp ├── halfpyramid.cpp ├── insert in linkedlist.layout ├── insertion_sort_linked_list.cpp ├── kruskal.cpp ├── lonestValidParanthesis.cpp ├── main.c ├── main.cpp ├── max number.cpp ├── maximum subarray sum of size k.cpp ├── n_queen_problem.cpp ├── postive-negative.cpp ├── quick sort cpp ├── quickSort.cpp ├── readme.txt ├── scss.layout ├── shell-sort.cpp ├── solvingthesudoku.cpp ├── sorting.cpp ├── stack_array_implementation.cpp ├── stack_using_vector.cpp ├── sum_of_digits_of_a_num.cpp ├── towerofhanoi.cpp ├── transposegraph.cpp └── two_sum.cpp ├── Competitive Coding ├── 1063-No. of valid Subarrays.java ├── 15-three sum.java ├── 224-basic calculator.java ├── 66. Plus One.CPP ├── Check_whether_String_is_Palindrome_or_not.cpp ├── Converting_Roman_Numerals_to_Decimal.cpp ├── Copy set bits in a range.cpp ├── Count number of bits to be flipped to convert A to B.cpp ├── Count set bits in an integer.cpp ├── Count total set bits in all numbers from 1 to n.cpp ├── Create a square with diamond carved in it ├── Equilbrium_Element.java ├── Find the two non-repeating elements.cpp ├── LongestCommonSubsequence.cpp ├── MCM.java ├── OptimalBST.java ├── Program to find whether a no is power of two.cpp ├── QuadraticEquation.java ├── Reverse a String.cpp ├── Spiral Traversal on a matrix ├── coinChange.cpp ├── quick_sort.java ├── readme.md ├── stringtask.cpp └── theatresquares.cpp ├── Convert to binary code.java ├── Cyber Security ├── Cybersecurity Careers └── readme.text ├── Data Structures and Algorithms ├── Binary Tree │ ├── BinarySearchTree.h │ ├── BinaryTreeNode.h │ ├── BinaryTreeSearchUse.cpp │ ├── BinaryTreeUse.cpp │ └── LCAofBST.cpp ├── BinarySearchJava.java ├── Doubly_LL │ ├── palindrome │ └── palindrome.cpp ├── Linked List │ ├── Merge_2_sorted_LL.py │ └── insertLL.cpp ├── LinkedList.java ├── PlusOne.java ├── ProgramToImplementBinarySearch.cpp ├── Queue │ ├── NodeClass.h │ ├── queueUse.cpp │ ├── queueUse.exe │ ├── queueUsingArray.h │ ├── queueUsingDynamically.h │ └── queueUsingLL.h ├── Rearrange_Array_Alternately.java ├── Searching_in_an_array_where_adjacent_differ_byatmostk.java ├── SelectionSorting.java ├── Stack │ ├── StackUse.cpp │ ├── StackUsingArray.cpp │ ├── StackUsingLL.cpp │ └── StackUsingTemplate.cpp ├── Tree │ ├── Tree.cpp │ ├── Tree.exe │ └── TreeNode.h ├── arrayrotation.cpp ├── average.c ├── fibonacci.c ├── funccall.c ├── heapSort.java ├── linear_search.cpp ├── pairofsum.cpp ├── readme.text ├── selection sort in arrays.c ├── string.c ├── sumofdigits.c ├── switchcasecalc.c ├── towerofhanoi.c └── year.c ├── Dijkstra.cpp ├── Doubly_Linked_List.c ├── ElectricityBillCalc.py ├── FarenheitToCelcius.py ├── Full Stack App Development ├── Book App │ ├── .gitignore │ ├── .idea │ │ ├── .gitignore │ │ ├── compiler.xml │ │ ├── gradle.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── recyclerview │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── recyclerview │ │ │ │ │ ├── Book.kt │ │ │ │ │ ├── BookAdapter.kt │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── item_view.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── recyclerview │ │ │ └── ExampleUnitTest.kt │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── CounterApp │ ├── .gitignore │ ├── .idea │ │ ├── .gitignore │ │ ├── codeStyles │ │ │ ├── Project.xml │ │ │ └── codeStyleConfig.xml │ │ ├── compiler.xml │ │ ├── gradle.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── helloworld │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── helloworld │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── helloworld │ │ │ └── ExampleUnitTest.kt │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── GreetingApp │ ├── .gitignore │ ├── .idea │ │ ├── .gitignore │ │ ├── compiler.xml │ │ ├── gradle.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── greetingapp │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── greetingapp │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── greetingapp │ │ │ └── ExampleUnitTest.kt │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── Intent │ ├── .gitignore │ ├── .idea │ │ ├── .gitignore │ │ ├── compiler.xml │ │ ├── gradle.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── intent │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── intent │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── SecondActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_second.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── intent │ │ │ └── ExampleUnitTest.kt │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle └── readme.text ├── Full Stack Web Development ├── drum kit │ ├── Sound │ │ ├── crash.mp3 │ │ ├── kick-bass.mp3 │ │ ├── snare.mp3 │ │ ├── tom-1.mp3 │ │ ├── tom-2.mp3 │ │ ├── tom-3.mp3 │ │ └── tom-4.mp3 │ ├── image │ │ ├── crash.png │ │ ├── kick.png │ │ ├── snare.png │ │ ├── tom1.png │ │ ├── tom2.png │ │ ├── tom3.png │ │ └── tom4.png │ ├── index.html │ ├── script.js │ └── style.css ├── movie seat booking │ ├── index.html │ ├── main.js │ └── style.css ├── readme.text └── youtube-clone │ ├── Resources │ ├── download.gif │ ├── favicon_32x32.png │ ├── hamburger.png │ ├── youtube_logo.png │ └── youtube_logo.webp │ ├── css │ └── styles.css │ ├── index.html │ └── script.js ├── Graphic Designing ├── App Development.png ├── BreadBoard Coding Society (1).png ├── Copy of BreadBOard COding Society.png ├── bread12.png ├── breadboard10001-0150.mp4 ├── breadboard23.png ├── cofefee.png └── readme.text ├── Iterative Merge sort.c ├── JS_Accordin ├── index.html ├── main.js └── style.css ├── LICENSE ├── Longest Palindrome in a String.py ├── Machine Learning...Artificial Intelligence...Data Sciences ├── KMeans Clustering.ipynb ├── Model Creation.ipynb ├── Model Validating.ipynb ├── Overfitting and Underfitting.ipynb ├── melb_data.csv ├── random_forest.ipynb └── readme.text ├── Max_circular_subarray_sum.cpp ├── Merge Two Sorted Array.c ├── MergeSort.cpp ├── Merge_k_Sorted_Arrays.CPP ├── Prims.cpp ├── Prims.exe ├── Prims_py.ipynb ├── Python ├── Alphabet_half_pyramid.py ├── BMI.py ├── BinarySearch.py ├── Calculator.py ├── CoinFlip.py ├── Colored Text with Python.py ├── DiamondOfStars.py ├── Dice.py ├── DiceSim.py ├── DigitalClock.py ├── EmailSlicer.py ├── Factorial.py ├── FibonacciSeries.py ├── Floyd_triangle.py ├── FractalTreePattern.py ├── GoogleLogo.py ├── InfiniteHexagon.py ├── Morse_code_translator.py ├── MultiplicationTable.py ├── NumberOfDigits.py ├── Pair_Sum.py ├── Palindrome.py ├── Pascal_triangle.py ├── Pyramid_of_numbers.py ├── Pyramidpattern.py ├── QR Code Generation using Python.py ├── QRcodeToText.py ├── Quick sort.py ├── RootsOfQuadratic.py ├── SimpleInterest.py ├── Transpose and Flatten.py ├── TurtleGraphics.py ├── WeightConverter.py ├── bst_insert.py ├── calculatorGUI.py ├── date_validation.py ├── factorial.py ├── guess number game.py ├── heart.py ├── news teller.py ├── prime.py ├── pronouncer.py ├── readme.txt ├── roman to decimals.py ├── snakeGame.py └── swggame.py ├── Q1.java ├── README.md ├── Random_Color_Generator_Project ├── README.md ├── index.html ├── script.js └── style.css ├── Recursive merge sort.c ├── RemoveloopinLinkedList.cpp ├── SelectionSort.cpp ├── Smallest_Positive_Missing_Number.cpp ├── Some basic C programs ├── area_of_circle.c ├── area_of_square.c ├── avg_of_3_number.c ├── cube_of_number.c ├── digit.c ├── divisble_by_2.c ├── smallest.c └── sum.c ├── Sparse Mattrix addition.c ├── Stack.c ├── Technical Content Writing └── readme.text ├── UI-UX Development └── readme.text ├── Web development Projects ├── HolaCuians │ ├── WhatsApp_Image_2021-04-25_at_2.44.20_PM-removebg-preview.png │ ├── WhatsApp_Image_2021-04-25_at_2.46.17_PM-removebg-preview.png │ ├── WhatsApp_Image_2021-04-25_at_2.46.17_PM__1_-removebg-preview.png │ ├── WhatsApp_Image_2021-04-25_at_2.46.17_PM__2_-removebg-preview.png │ ├── index.html │ └── logo 33.png ├── Typing-Speed-Tester │ ├── README.md │ ├── composer.json │ ├── index.html │ ├── index.php │ ├── script.js │ └── style.css ├── readme ├── snakes&ladders │ ├── board.css │ ├── board.js │ └── index.html └── tictactoe │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ └── src │ ├── App.js │ ├── components │ ├── Board.js │ ├── History.js │ ├── Square.js │ └── StatusMessage.js │ ├── helpers.js │ ├── index.js │ └── styles │ └── root.scss ├── binary.cpp ├── calculator.cpp ├── calculator.py ├── clone_a_link_list_with_next_and_random_pointer.cpp ├── factorial.py ├── heapC++.cpp ├── java ├── Alarmclock.html ├── Alarmclock.js ├── ArraysWithLoops.java ├── BubbleSort.java ├── BucketSort.java ├── Calculating Factorial.java ├── ContactManager.java ├── CyclicSort.java ├── D extends C.java ├── Factorial.java ├── Fibonacci.java ├── FibonacciSeries.java ├── First Position of Target │ ├── Solution.class │ ├── Solution.java │ ├── helper.class │ ├── helper.java │ ├── readme.md │ └── solution.md ├── InvertedCommas.java ├── Lab4Q6.java ├── Longest Increasing Subsequnce.java ├── MainBank.java ├── Meeting Rooms.java ├── Merge Intervals.java ├── Merge Two Sorted List.java ├── MergeSort.java ├── Palindrome.java ├── PrimeNumber.java ├── PrimeNumbers2.java ├── QuickSort.java ├── Sets.java ├── StackMain.java ├── Threads3.java ├── TrappingRainWater.java ├── anybasetoanybase.java ├── insertionSort.java ├── jvm │ └── SimpleJVMDemo.java ├── merge_two_sorted_linkedlist.java ├── readme.txt └── style.css ├── merge_two_max_heaps.CPP ├── mergesortforlinkedlist.cpp ├── oops ├── 1.oop.cpp ├── 1.oop.exe ├── 2.1.cpp ├── 2.1.exe ├── 2.2.cpp ├── 2.2.exe ├── 2.3.cpp ├── 2.3.exe ├── 2.constructor and destructor.cpp ├── 2.constructor and destructor.exe ├── 3.1 copy constructor.cpp ├── 3.1 copy constructor.exe ├── 3.copy constructor.cpp ├── 3.copy constructor.exe ├── 4.destructor.cpp ├── 4.destructor.exe ├── 5.this_pointer.cpp ├── 5.this_pointer.exe ├── 6.Static members.cpp ├── 6.Static members.exe ├── 7.1.virtual functions.cpp ├── 7.1.virtual functions.exe ├── 7.2.virtual functions.cpp ├── 7.2.virtual functions.exe ├── 7.3.virtual functions.cpp ├── 7.3.virtual functions.exe ├── 7.inheritance and virtual functions.cpp ├── 8.1.cpp ├── 8.1.exe ├── 8.inheritance example.cpp ├── 8.inheritance example.exe ├── 9.multiple inheritance.cpp ├── 9.multiple inheritance.exe ├── oop sample 2.cpp ├── oop sample 2.exe ├── oop sample1.cpp └── oop sample1.exe ├── prime.py └── shopping-list.cpp /Blockchain/readme.text: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Bruhtask-app/Assets/Svg/waves.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Bruhtask-app/Assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Bruhtask-app/Assets/images/logo.png -------------------------------------------------------------------------------- /Bruhtask-app/Assets/styles/about.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | html { 8 | scroll-behavior: smooth; 9 | } 10 | 11 | body { 12 | background-color: #d9effd57; 13 | } 14 | 15 | .wave__container { 16 | position: absolute; 17 | top: 0; 18 | width: 100%; 19 | z-index: -2; 20 | } 21 | 22 | .heading { 23 | text-align: center; 24 | font-family: "Festive", cursive; 25 | font-size: 3rem; 26 | } 27 | 28 | .heading2 { 29 | font-family: "Festive", cursive; 30 | font-size: 3rem; 31 | } 32 | 33 | .container { 34 | margin-top: -6rem; 35 | } 36 | 37 | .prim a { 38 | text-decoration: none; 39 | } 40 | 41 | .prim:hover.prim a, 42 | .prim a:hover { 43 | color: #fff; 44 | } 45 | -------------------------------------------------------------------------------- /Bruhtask-app/README.md: -------------------------------------------------------------------------------- 1 |

Bruhtask

2 | 3 | - A simple task management app designed with Bootstrap design styles. 4 | 5 | ## About the App 6 | 7 | - The Web app is designed using HTML-CSS-JS. 8 | 9 | ![image](https://raw.githubusercontent.com/Vijayrajdev/Bruhtask/master/Assets/images/main.png) 10 | 11 | - App link [Click here🎉](https://bruhtask.vercel.app/) 12 | - Author Name [Vijay Raj](https://github.com/Vijayrajdev) 13 | -------------------------------------------------------------------------------- /C++/1D prefix sum .cpp: -------------------------------------------------------------------------------- 1 | // https://www.spoj.com/problems/CSUMQ/ 2 | #include 3 | #define ll long long 4 | using namespace std; 5 | int main() 6 | { 7 | ios::sync_with_stdio(0); 8 | cin.tie(0); 9 | int n; 10 | cin >> n; 11 | int arr[n]; 12 | for (int i = 0; i < n; i++) 13 | { 14 | cin >> arr[i]; 15 | } 16 | int prefix[n]; 17 | for (int i = 0; i < n; i++) 18 | { 19 | if (i == 0) 20 | { 21 | prefix[0] = arr[0]; 22 | } 23 | else 24 | { 25 | prefix[i] = prefix[i - 1] + arr[i]; 26 | } 27 | } 28 | 29 | int t = 1; 30 | cin >> t; 31 | while (t--) 32 | { 33 | int l, r; 34 | cin >> l >> r; 35 | int sum = prefix[r]; 36 | if (l - 1 >= 0) 37 | { 38 | sum -= prefix[l - 1]; 39 | } 40 | cout << sum << '\n'; 41 | } 42 | return 0; 43 | } -------------------------------------------------------------------------------- /C++/AdvancedPattern.cpp: -------------------------------------------------------------------------------- 1 | // MADE BY LOVE - KUNAL 2 | 3 | #include 4 | using namespace std; 5 | int main() 6 | { 7 | int h; 8 | cout<<"Enter the height "<>h; 10 | 11 | for(int i=1; i<=h; i++) 12 | { 13 | int space=2*h-2*i; 14 | for(int j=1; j<=i; j++) 15 | { 16 | cout<<"*"; 17 | } 18 | for(int j=1; j<=space; j++) 19 | { 20 | cout<<" "; 21 | } 22 | for(int j=1; j<=i; j++) 23 | { 24 | cout<<"*"; 25 | } 26 | cout<=1; i--) 30 | { 31 | int space=2*h-2*i; 32 | for(int j=1; j<=i; j++) 33 | { 34 | cout<<"*"; 35 | } 36 | for(int j=1; j<=space; j++) 37 | { 38 | cout<<" "; 39 | } 40 | for(int j=1; j<=i; j++) 41 | { 42 | cout<<"*"; 43 | } 44 | cout< 2 | #include 3 | using namespace std; 4 | 5 | int main(){ 6 | cout<<"ENTER A NUMBER:"; 7 | int n; 8 | cin>>n; 9 | int sum=0; 10 | int originaln=n; 11 | while(n>0){ 12 | int lastdigit=n%10; //find last digit by modulus 13 | int cube=pow(lastdigit,3); //its determine the cube of a no 14 | sum+=cube; 15 | n=n/10; 16 | } 17 | if(sum==originaln){ 18 | cout<<"ITS A ARMSTRONG NUMBER!"< runningSum(vector& nums) { 2 | 3 | 4 | for(int i=1;i& arr, int n){ 3 | 4 | // Your code here 5 | 6 | sort(arr.begin(), arr.end()); //use any sorting technique 7 | 8 | 9 | for(int i=0;i &arr, int n) 2 | { 3 | int larg = arr[0]; 4 | for(int i=0;i larg) 7 | { 8 | larg = arr[i]; 9 | } 10 | } 11 | 12 | return larg; 13 | } 14 | -------------------------------------------------------------------------------- /C++/Arrays/play with Or: -------------------------------------------------------------------------------- 1 | int* game_with_number(int arr[], int n) 2 | { 3 | 4 | // Complete the function 5 | for(int i=0;ileft); 20 | int rs = findSum(root->right); 21 | ls = max(ls,0); 22 | rs = max(rs, 0); 23 | int cs = ls + rs + root->val; 24 | sum = max(sum, cs); 25 | 26 | return max(ls, rs) + root->val; 27 | 28 | } 29 | int maxPathSum(TreeNode* root) { 30 | findSum(root); 31 | return sum; 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /C++/Basic/Diamond_pattern.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int n; 6 | cin>>n; 7 | for(int i=0;i<=n/2;i++) 8 | { 9 | for(int j=0;j<=n-i;j++) 10 | { 11 | if(j 4 | using namespace std; 5 | 6 | double fact(double i) 7 | { 8 | if(i==0) 9 | { 10 | return 1; 11 | } 12 | else 13 | { 14 | return i*fact(i-1); 15 | } 16 | } 17 | 18 | int main() 19 | { 20 | double s,x,f; 21 | int k=0; 22 | cout<<"Enter the value of x : "; 23 | cin>>x; 24 | double n; 25 | cout<<"Enter the value of n : "; 26 | cin>>n; 27 | double result=0; 28 | 29 | for(double i=1;i<=n;i++) 30 | { 31 | if(k%2==0) 32 | { 33 | result=result+(x/fact(i)); 34 | } 35 | else 36 | { 37 | result=result-(x/fact(i)); 38 | } 39 | k++; 40 | } 41 | cout<<"The result is : "< 20 | using namespace std; 21 | 22 | int main() 23 | { 24 | int n; 25 | cout<<"Enter a Number:-"; 26 | cin>>n; 27 | 28 | int output=0; 29 | while(output*output<=n) 30 | { 31 | output+=1; 32 | } 33 | 34 | output-=1; 35 | 36 | cout<<"Ans:"< 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n, i, c, a = 1; 7 | 8 | cout << "Enter the number of rows of Floyd's triangle to print: "; cin >> n; 9 | 10 | for (i = 1; i <= n; i++) 11 | { 12 | for (c = 1; c <= i; c++) 13 | { 14 | cout << a; 15 | a++; 16 | } 17 | cout << endl; 18 | } 19 | return 0; 20 | } -------------------------------------------------------------------------------- /C++/Basic/hollowdiamond.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int i,j,k,r; 7 | cout<<"Enter no. of rows: "; 8 | cin>>r; 9 | for(i=1;i<=r;i++) 10 | { 11 | for(j=1;j<=r-i;j++) 12 | cout<<"*"; 13 | for(k=1;k<=2*i-1;k++) 14 | { 15 | if(k==1 || k==2*i-1) 16 | cout<<"*"; 17 | else 18 | cout<<" "; 19 | } 20 | for(j=1;j<=r-i;j++) 21 | cout<<"*"; 22 | cout<<"\n"; 23 | } 24 | for(i=r;i>=1;i--) 25 | { 26 | for(j=1;j<=r-i;j++) 27 | cout<<"*"; 28 | for(k=1;k<=2*i-1;k++) 29 | { 30 | if(k==1 || k==2*i-1) 31 | cout<<"*"; 32 | else 33 | cout<<" "; 34 | } 35 | for(j=1;j<=r-i;j++) 36 | cout<<"*"; 37 | cout<<"\n"; 38 | } 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /C++/Basic/ifelse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | 6 | int savings; 7 | cout<<"HOW MUCH CASH DO YOU HAVE?\n"; 8 | cin>>savings; 9 | 10 | if(savings>10000){ 11 | cout<<"BUY A NEW PHONE"; 12 | } 13 | 14 | else if(savings<1000){ 15 | cout<<"ORDER FOOD"; 16 | } 17 | 18 | else{ 19 | cout<<"GO FOR SHOPPING\n"; 20 | 21 | if(savings<5000){ 22 | cout<<"SHOP FROM H&M"; 23 | } 24 | else 25 | cout<<"SHOP FROM BURBERRY"; 26 | 27 | } 28 | return 0; 29 | } -------------------------------------------------------------------------------- /C++/Basic/inverted.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | 6 | int n; 7 | cin>>n; 8 | 9 | for(int i=1;i<=n;i++){ 10 | for(int j=1;j<=n+1-i;j++){ 11 | cout< 2 | using namespace std; 3 | 4 | int main(){ 5 | 6 | int n; 7 | cin>>n; 8 | 9 | for(int i=1;i<=n;i++){ 10 | for(int j=1;j<=n-i;j++){ 11 | cout<<" "; 12 | } 13 | for(int j=1;j<=i;j++){ 14 | cout< 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int rows; 7 | cout << "Enter the number of rows of Pascal's triangle to print : "; 8 | cin >> rows; 9 | cout << endl; 10 | 11 | for (int i = 0; i < rows; i++) 12 | { 13 | int val = 1; 14 | for (int j = 1; j < (rows - i); j++) 15 | { 16 | cout << " "; 17 | } 18 | for (int k = 0; k <= i; k++) 19 | { 20 | cout << " " << val; 21 | val = val * (i - k) / (k + 1); 22 | } 23 | cout << endl << endl; 24 | } 25 | cout << endl; 26 | return 0; 27 | } -------------------------------------------------------------------------------- /C++/Basic/pattern1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main(){ 4 | int i,j; 5 | int n=5; 6 | for(i=n;i>=1;i--){ 7 | for (j=i;j<=n;j++){ 8 | cout<<((char)(j+64)); 9 | } 10 | cout< 2 | using namespace std; 3 | int main(){ 4 | int i,j; 5 | int n=4; 6 | for(i=1; i<=n; i++) 7 | { 8 | for(j=1; j<=n-i; j++) // prints spaces 9 | { 10 | cout<<" "; 11 | } 12 | 13 | for(j=1; j<=i; j++) // prints numbers 14 | { 15 | cout<< j; 16 | } 17 | 18 | cout<<"\n"; 19 | } 20 | 21 | return 0; 22 | } 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /C++/Basic/pow_of_no.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n,pow1; 7 | cout<<"Enter a number:- "; 8 | cin>>n; 9 | cout<<"Enter power of a number:- "; 10 | cin>>pow1; 11 | int ans=1; 12 | for(int i=1;i<=pow1;i++) 13 | { 14 | ans=ans*n; 15 | } 16 | cout<<"Output:- "< 3 | using namespace std; 4 | 5 | int main(){ 6 | 7 | int n; 8 | cin>>n; 9 | 10 | for(int i=1;i<=n;i++){ 11 | for(int j=1;j<=n-i;j++){ 12 | cout<<" "; 13 | } 14 | for(int j=1;j<=n;j++){ 15 | cout<<"*"; 16 | } 17 | cout< 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n; 7 | cout<<"Enter a number:- "; 8 | cin>>n; 9 | 10 | 11 | int evenSum=0; 12 | int oddSum=0; 13 | 14 | while(n>0) 15 | { 16 | int x=n%10; 17 | n=n/10; 18 | if(x%2==0) 19 | { 20 | evenSum+=x; 21 | } 22 | 23 | else 24 | { 25 | oddSum+=x; 26 | } 27 | } 28 | 29 | cout<<"EvenSum:-"< 2 | using namespace std; 3 | 4 | int main(){ 5 | 6 | int k; 7 | cin>>k; 8 | 9 | for(int i=1;i<=3;i++){ 10 | for(int j=1;j<=k;j++){ 11 | if(((i+j)%4==0) || (i==2 && j%4==0)){ 12 | cout<<"*"; 13 | } 14 | else{ 15 | cout<<" "; 16 | } 17 | } 18 | cout< 4 | 5 | 1599689302 source:/home/jayant/Documents/projects/Bubble sort ques/main.cpp 6 | 7 | 8 | -------------------------------------------------------------------------------- /C++/Bubble sort ques/Bubble sort ques.layout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++/Bubble sort ques/bin/Debug/Bubble sort ques: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/C++/Bubble sort ques/bin/Debug/Bubble sort ques -------------------------------------------------------------------------------- /C++/Bubble sort ques/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | 6 | int bubblesort(int arr[], int n) 7 | { int i; 8 | int temp; 9 | for( i=0;i arr[j+1]) 14 | { 15 | temp = arr[j]; 16 | arr[j] = arr[j+1]; 17 | arr[j+1] = temp; 18 | } 19 | } 20 | } 21 | 22 | for(int i=0;i> n; 36 | 37 | cout <<" Enter value of array :"<> arr[i]; 42 | } 43 | 44 | int result = bubblesort(arr, n); 45 | cout << result; 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /C++/Bubble sort ques/obj/Debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/C++/Bubble sort ques/obj/Debug/main.o -------------------------------------------------------------------------------- /C++/BubbleSort.cpp: -------------------------------------------------------------------------------- 1 | //sorted array using bubble sort 2 | #include 3 | using namespace std; 4 | 5 | int main() 6 | { 7 | 8 | int i,n; 9 | cout<<"Enter the size of array :"; 10 | cin>>n; 11 | int a[n]; 12 | cout<<"Enter Elements : \n"; 13 | for(i=0;i>a[i]; 16 | } 17 | //bubble sort logic 18 | for(int i=0;ia[j+1]) 23 | { 24 | int temp=a[j]; 25 | a[j]=a[j+1]; 26 | a[j+1]=temp; 27 | } 28 | } 29 | } 30 | //sorted array 31 | cout<<"*****SORTED ARRAY*****\n"; 32 | for(int i=0;i 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n1, n2, max; 7 | 8 | cout << "Enter two numbers: "; 9 | cin >> n1 >> n2; 10 | 11 | // maximum value between n1 and n2 is stored in max 12 | max = (n1 > n2) ? n1 : n2; 13 | 14 | do 15 | { 16 | if (max % n1 == 0 && max % n2 == 0) 17 | { 18 | cout << "LCM = " << max; 19 | break; 20 | } 21 | else 22 | ++max; 23 | } while (true); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /C++/Count_inversion.cpp: -------------------------------------------------------------------------------- 1 | //The number of switches required to make an array sorted is termed as inversion count 2 | #include 3 | 4 | using namespace std; 5 | 6 | int CountInversion(int a[], int n) 7 | { 8 | int i, j, count = 0; 9 | for(i = 0; i < n; i++) 10 | { 11 | for(j = i+1; j < n; j++) 12 | if(a[i] > a[j]) 13 | count++; 14 | } 15 | return count; 16 | } 17 | 18 | int main() 19 | { 20 | int n, i; 21 | cout<<"\nEnter the number of data element: "; 22 | cin>>n; 23 | 24 | int arr[n]; 25 | for(i = 0; i < n; i++) 26 | { 27 | cout<<"Enter element "<>arr[i]; 29 | } 30 | 31 | // Printing the number of inversion in the array. 32 | cout<<"\nThe number of inversion in the array: "< arr[j]) 7 | { 8 | int temp = arr[i]; 9 | arr[i] = arr[j]; 10 | arr[j] = temp; 11 | } 12 | } 13 | } 14 | } 15 | int getMissingElement(int* a,int a_size,int* b ,int b_size){ 16 | sort(a,a_size); 17 | sort(b,b_size); 18 | for (int i = 0; i < b_size; i++) 19 | { 20 | if(a[i] != b[i]){ 21 | return a[i]; 22 | } 23 | } 24 | return a[a_size-1]; 25 | } 26 | -------------------------------------------------------------------------------- /C++/Jump_game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int jump(vector& nums) { 4 | int cur = 0, prev = 0, count = 0; 5 | for(int i = 0; i < nums.size()-1; ++i) 6 | { 7 | //find the current max step 8 | cur = max(cur, i+nums[i]); 9 | //check if reach the top 10 | if(cur >= nums.size()-1) 11 | return count+1; 12 | //if pass the previous step, then jump 13 | if(i == prev) 14 | { 15 | prev = cur; 16 | ++count; 17 | } 18 | } 19 | return count; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /C++/PowerSet.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void Power(string S) 5 | { 6 | int n = S.length(); 7 | 8 | int total_comb = pow(2, n); 9 | for (int counter = 0; counter < total_comb; counter++) 10 | { 11 | string str=""; 12 | 13 | for (int k = 0; k < n; k++) 14 | { 15 | if (((1 << k) & counter) != 0) 16 | { 17 | str+=S[k]; 18 | } 19 | } 20 | cout <> set; 28 | Power(set); 29 | } 30 | -------------------------------------------------------------------------------- /C++/README.md: -------------------------------------------------------------------------------- 1 | # Competitive-Programming-Algos 2 | C++ implementation of algorithms learned and used while competitive programming 3 | -------------------------------------------------------------------------------- /C++/Sorting/WaveSort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void swap(int arr[], int i, int j){ 5 | 6 | int temp = arr[i]; 7 | arr[i]=arr[j]; 8 | arr[j]=temp; 9 | } 10 | 11 | void wavesort(int arr[], int n){ 12 | 13 | for(int i=1;i>arr[i-1]){ 16 | swap(arr,i,i-1); 17 | } 18 | if(arr[i]>arr[i+1] && i<=n-2){ 19 | swap(arr,i,i+1); 20 | } 21 | } 22 | } 23 | 24 | int main(){ 25 | 26 | 27 | int arr[]={1,2,3,4,5,6,7}; 28 | wavesort(arr,7); 29 | 30 | 31 | for(int i=0;i<7;i++){ 32 | cout< 2 | using namespace std; 3 | 4 | int main(void) 5 | { 6 | int n; 7 | cin >> n; 8 | int a[n]; 9 | for (int i = 0; i < n; i++) 10 | { 11 | cin >> a[i]; 12 | } 13 | int count = 0; 14 | bool swapped = false; 15 | while (count < n - 1) 16 | { 17 | for (int i = 0; i < n - count - 1; i++) 18 | { 19 | if (a[i] > a[i + 1]) 20 | { 21 | swap(a[i], a[i + 1]); 22 | swapped = true; 23 | } 24 | } 25 | if (swapped == false) 26 | { 27 | break; 28 | } 29 | 30 | count++; 31 | } 32 | for (int i = 0; i < n; i++) 33 | { 34 | cout << a[i] << " "; 35 | } 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /C++/Sorting/insertion_sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(void) 5 | { 6 | int n; 7 | cin >> n; 8 | int a[n]; 9 | for (int i = 0; i < n; i++) 10 | { 11 | cin >> a[i]; 12 | } 13 | for (int i = 1; i < n; i++) 14 | { 15 | int temp = a[i]; 16 | int j = i - 1; 17 | while (j >= 0 && a[j] > temp) 18 | { 19 | a[j + 1] = a[j]; 20 | j--; 21 | } 22 | a[j + 1] = temp; 23 | } 24 | for (int i = 0; i < n; i++) 25 | { 26 | cout << a[i] << " "; 27 | } 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /C++/Sorting/selectionsort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void print(int arr[], int n) 5 | { 6 | for (int i = 0; i < n; i++) 7 | { 8 | cout << arr[i] << " "; 9 | } 10 | cout << endl; 11 | } 12 | 13 | void swapx(int arr[], int i, int j) 14 | { 15 | int temp = arr[i]; 16 | arr[i] = arr[j]; 17 | arr[j] = temp; 18 | } 19 | 20 | void sorting(int arr[], int n) 21 | { 22 | for (int i = 0; i < n - 1; i++) 23 | { 24 | int min = i; 25 | for (int j = 1; j < n; j++) 26 | { 27 | if (arr[j] < arr[min]) 28 | { 29 | min = j; 30 | } 31 | } 32 | swapx(arr, min, i); 33 | } 34 | } 35 | 36 | int main() 37 | { 38 | int n; 39 | cin >> n; 40 | int arr[n]; 41 | for (int i = 0; i < n; i++) 42 | { 43 | cin >> arr[i]; 44 | } 45 | sorting(arr, n); 46 | print(arr, n); 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /C++/Stickler_theif.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int n; 6 | cin>>n; 7 | int nums[n]; 8 | for(int i=0;i>nums[i]; 10 | int dp[n+1]; 11 | if(n==0) 12 | cout<<"0"; 13 | else if(n==1) 14 | cout< 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | int i,j,k,co=0; 8 | char a[20]; 9 | cout<<"Enter your string"<=0 && a[k]!='\0';j--,k++) 13 | { 14 | if(a[k]==a[j]) 15 | { 16 | co=1; 17 | break; 18 | } 19 | } 20 | if(co==0) 21 | { 22 | cout<<"It is a palindrome"; 23 | } 24 | else 25 | { cout<<"It is not a palindrome"; 26 | } 27 | getch(); 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /C++/TernarySearch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | //A program to perform ternary search 5 | //Ternary Search is a searching technique, used to determine a position of a specific vale in an (sorted) array in order of O(log3(n)) time 6 | 7 | void search(string s, string t) 8 | { 9 | string concat = t + "$" + s; 10 | int n = concat.length(); 11 | 12 | int z[] 13 | } 14 | 15 | int main() 16 | { 17 | string s = "Hello,World"; 18 | string t = "llo"; 19 | search(s, t); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /C++/ascending array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main(){ 4 | 5 | int i, j, size, a[20],temp; 6 | cout<<"enter the size of array: "; 7 | cin>>size; 8 | for(i=0;i>a[i]; 11 | } 12 | cout<<"the unsorted array is: "; 13 | for(i=0;ia[j+1]){ 20 | temp=a[j]; 21 | a[j]=a[j+1]; 22 | a[j+1]=temp; 23 | } 24 | } 25 | } 26 | cout<<"\nthe sorted array is: "; 27 | for(j=size-1;j>=0;j--){ 28 | cout<<" "<left); 12 | if(leftHeight==-1) 13 | return -1; 14 | int rightHeight = height(root->right); 15 | if(rightHeight ==-1) 16 | return -1; 17 | if(abs(leftHeight - rightHeight)>1) 18 | return -1; 19 | return max(leftHeight , rightHeight) + 1; 20 | } 21 | 22 | }; 23 | -------------------------------------------------------------------------------- /C++/binary search/bin/Debug/binary search: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/C++/binary search/bin/Debug/binary search -------------------------------------------------------------------------------- /C++/binary search/binary search.layout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++/binary search/obj/Debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/C++/binary search/obj/Debug/main.o -------------------------------------------------------------------------------- /C++/binarytodecimal.cpp: -------------------------------------------------------------------------------- 1 | // C++ program to convert binary to decimal 2 | #include 3 | using namespace std; 4 | 5 | // Function to convert binary to decimal 6 | int binaryToDecimal(int n) 7 | { 8 | int num = n; 9 | int dec_value = 0; 10 | 11 | // Initializing base value to 1, i.e 2^0 12 | int base = 1; 13 | 14 | int temp = num; 15 | while (temp) { 16 | int last_digit = temp % 10; 17 | temp = temp / 10; 18 | 19 | dec_value += last_digit * base; 20 | 21 | base = base * 2; 22 | } 23 | 24 | return dec_value; 25 | } 26 | 27 | // Driver program to test above function 28 | int main() 29 | { 30 | int num = 10101001; 31 | 32 | cout << binaryToDecimal(num) << endl; 33 | } 34 | -------------------------------------------------------------------------------- /C++/bubblesort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | cout<<"Enter 10 numbers"<>arr[i]; 10 | } 11 | for(int i=1; i<10; i++){ 12 | for(int j=0; j<10-i; j++){ 13 | if(arr[j]>arr[j+1]){ 14 | int temp= arr[j+1]; 15 | arr[j+1]= arr[j]; 16 | arr[j]= temp; 17 | } 18 | } 19 | } 20 | cout<<"array after sorting"< 3 | 4 | #include 5 | 6 | #include 7 | 8 | using namespace std; 9 | 10 | void bucketSort(float arr[], int n) 11 | { 12 | 13 | // 1) Create n empty buckets 14 | vector b[n]; 15 | 16 | 17 | // 2) Put array elements 18 | for (int i = 0; i < n; i++) { 19 | int bi = n * arr[i]; 20 | b[bi].push_back(arr[i]); 21 | } 22 | 23 | 24 | // 3) Sort 25 | for (int i = 0; i < n; i++) 26 | sort(b[i].begin(), b[i].end()); 27 | 28 | 29 | // 4) Concatenate all 30 | int index = 0; 31 | for (int i = 0; i < n; i++) 32 | for (int j = 0; j < b[i].size(); j++) 33 | arr[index++] = b[i][j]; 34 | } 35 | 36 | /* Driver program to test above function */ 37 | int main() 38 | { 39 | float arr[] 40 | = { 0.8437, 0.52355, 0.6346, 0.123 }; 41 | int n = sizeof(arr) / sizeof(arr[0]); 42 | bucketSort(arr, n); 43 | 44 | for (int i = 0; i < n; i++) 45 | cout << arr[i] << " "; 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /C++/code1.txt: -------------------------------------------------------------------------------- 1 | { 2 | 3 | 4 | int n=scn.nextInt(); 5 | 6 | int[] arr = new int[n]; 7 | 8 | for(int a=0;a=roomsiz) 34 | { 35 | System.out.println("YES"); 36 | } 37 | else 38 | { 39 | System.out.println("NO"); 40 | } 41 | 42 | } 43 | 44 | 45 | 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /C++/decimaltobinary.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | string decimal_to_binary(int n) 5 | { 6 | string ans; 7 | while(n>0){ 8 | int current_bit = n&1; 9 | ans+=current_bit+'0'; 10 | n>>=1; 11 | } 12 | reverse(ans.begin(),ans.end()); 13 | return ans; 14 | } 15 | int main() 16 | { 17 | string binary = decimal_to_binary(244); 18 | cout << binary << endl; 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /C++/duplicate.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main(){ 4 | int i, j, m, a[20]; 5 | cout<<"enter the size of array: "; 6 | cin>>m; 7 | for(i=0;i>a[i]; 10 | 11 | } 12 | for(i=0;i 2 | using namespace std; 3 | int main(){ 4 | int i,m,a[20],k=0,j=0,even[20],odd[20]; 5 | cout<<"enter the size of array: "; 6 | cin>>m; 7 | for(i=0;i>a[i]; 10 | } 11 | cout<<"the array is: "< 2 | using namespace std; 3 | int main(){ 4 | int i, s=1, num; 5 | cout<<"enter the value of num: "; 6 | cin>>num; 7 | for(i=1;i 2 | using namespace std; 3 | 4 | int main(){ 5 | int n; 6 | cout<<"Enter a number:"; 7 | cin>>n; 8 | int number=1; 9 | for(int i=1;i<=n;i++){ 10 | for(int j=1;j<=i;j++){ 11 | cout< 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n; 7 | cout<<"enter no\n"; 8 | cin>>n; 9 | 10 | for(int i=n;i>=1;i--) 11 | { 12 | for(int j=1;j<=i;j++) 13 | { 14 | cout< 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++/insertion_sort_linked_list.cpp: -------------------------------------------------------------------------------- 1 | ListNode* insertionSortList(ListNode* head) { 2 | if (head == nullptr || head->next == NULL) 3 | return head; 4 | ListNode *h = insertionSortList(head->next); 5 | if (head->val <= h->val) { 6 | head->next = h; 7 | return head; 8 | } 9 | ListNode *node = h; 10 | while (node->next && head->val > node->next->val) 11 | node = node->next; 12 | head->next = node->next; 13 | node->next = head; 14 | return h; 15 | } 16 | -------------------------------------------------------------------------------- /C++/main.c: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /C++/max number.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | using namespace std; 4 | 5 | class XYZ; 6 | class ABC 7 | { 8 | int a; 9 | 10 | public: 11 | 12 | void setvalue(int i) 13 | { a=i; } 14 | 15 | friend void MAX(ABC,XYZ); 16 | }; 17 | 18 | class XYZ 19 | { 20 | int x; 21 | 22 | public: 23 | 24 | void setvalue(int i) 25 | { x=i; } 26 | 27 | friend void MAX(ABC,XYZ); 28 | }; 29 | 30 | void MAX(ABC m,XYZ n) 31 | { 32 | if (m.a>n.x) 33 | { 34 | cout< 5 | using namespace std; 6 | int main() 7 | { 8 | int n = 5; 9 | int arr[n] = {2, 1, 2, 3, 5}; 10 | int p[n]; 11 | for (int i = 0; i < n; i++) 12 | { 13 | if (i == 0) 14 | p[0] = arr[0]; 15 | else 16 | { 17 | p[i] = p[i - 1] + arr[i]; 18 | } 19 | } 20 | int k = 3, sum = 0, max = 0; 21 | for (int i = 0; i <= n - k; i++) 22 | { 23 | int l = i, r = i + k - 1; 24 | sum = p[r]; 25 | if (l - 1 >= 0) 26 | sum -= p[l - 1]; 27 | if (sum > max) 28 | max = sum; 29 | } 30 | cout << max << "\n"; 31 | 32 | return 0; 33 | } -------------------------------------------------------------------------------- /C++/postive-negative.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int number; 6 | 7 | cout << "Enter an integer: "; 8 | cin >> number; 9 | if (number >= 0) { 10 | cout << "You entered a positive integer: " << number << endl; 11 | } 12 | else { 13 | cout << "You entered a negative integer: " << number << endl; 14 | } 15 | cout << "This line is always printed."; 16 | return 0; 17 | } -------------------------------------------------------------------------------- /C++/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /C++/scss.layout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++/stack_using_vector.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | struct mystack 6 | { 7 | vector v; 8 | 9 | void push(int x) 10 | { 11 | v.push_back(x); 12 | } 13 | 14 | int pop() 15 | { 16 | int res = v.back(); 17 | v.pop_back(); 18 | return res; 19 | } 20 | 21 | int size() 22 | { 23 | return v.size(); 24 | } 25 | 26 | int peek() 27 | { 28 | return v.back(); 29 | } 30 | 31 | bool isempty() 32 | { 33 | return v.empty(); 34 | } 35 | }; 36 | 37 | int main(void) 38 | { 39 | mystack s; 40 | s.push(5); 41 | s.push(10); 42 | s.push(15); 43 | cout << s.pop() << endl; 44 | cout << s.size() << endl; 45 | cout << s.peek() << endl; 46 | cout << s.isempty() << endl; 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /C++/sum_of_digits_of_a_num.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | /* Function */ 5 | int Sumdigits(int n) 6 | { 7 | int sum = 0; 8 | while (n != 0) 9 | { 10 | sum = sum + n % 10; 11 | n = n / 10; 12 | } 13 | return sum; 14 | } 15 | 16 | int main() 17 | { 18 | int n; 19 | cin >> n; 20 | cout << Sumdigits(n) << endl; 21 | return 0; 22 | } 23 | 24 | //example - 25 | 26 | // input = 45 27 | // output = 9 28 | 29 | // input = 5654 30 | // output = 20 31 | -------------------------------------------------------------------------------- /C++/towerofhanoi.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | void towers(int, char, char, char); 4 | int main() 5 | { 6 | int num; 7 | cout<<"Enter the number of disks : "; 8 | cin>>num; 9 | cout<<"The sequence of moves involved in the Tower of Hanoi are :n"; 10 | towers(num, 'A', 'C', 'B'); 11 | return 0; 12 | } 13 | void towers(int num, char frompeg, char topeg, char auxpeg) 14 | { 15 | if (num == 1) 16 | { 17 | cout<<"n Move disk 1 from peg "< twoSum(vector& nums, int target) { 4 | 5 | 6 | unordered_map hash; 7 | vector result; 8 | for (int i = 0; i < nums.size(); i++) 9 | if (hash.count(target - nums[i])) 10 | { 11 | result.push_back(hash[target - nums[i]]); 12 | result.push_back(i); 13 | return result; 14 | } 15 | else 16 | hash[nums[i]] = i; 17 | return result; 18 | } 19 | 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /Competitive Coding/1063-No. of valid Subarrays.java: -------------------------------------------------------------------------------- 1 | public class Main { 2 | 3 | public static int validSubarrays(int[] nums) { 4 | 5 | int ans=0; 6 | Stackst = new Stack<>(); 7 | 8 | 9 | for(int i=nums.length-1;i>=0;i--) 10 | { 11 | int val=nums[i]; 12 | 13 | while(st.size()>0 && nums[st.peek()]>=val) 14 | { 15 | st.pop(); 16 | } 17 | 18 | int sl=nums.length; 19 | if(st.size()>0) 20 | { 21 | sl=st.peek(); 22 | } 23 | 24 | ans+=sl-i; 25 | 26 | st.push(i); 27 | } 28 | return ans; 29 | } 30 | 31 | /* 32 | test cases 33 | n-5 34 | 35 | values 36 | 1 37 | 4 38 | 2 39 | 5 40 | 3 41 | */ -------------------------------------------------------------------------------- /Competitive Coding/15-three sum.java: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector> threeSum(vector& nums) { 4 | 5 | 6 | vector> output; 7 | sort(nums.begin(), nums.end()); 8 | for (int i = 0; i < nums.size(); ++i) { 9 | 10 | if (i != 0 && nums[i] == nums[i - 1]) continue; 11 | int j = i + 1; 12 | int k = nums.size() - 1; 13 | while (j < k) { 14 | if (nums[i] + nums[j] + nums[k] == 0) { 15 | output.push_back({nums[i], nums[j], nums[k]}); 16 | ++j; 17 | while (j < k && nums[j] == nums[j-1]) ++j; 18 | while(j 4 | using namespace std; 5 | 6 | 7 | // } Driver Code Ends 8 | //User function template for C++ 9 | class Solution{ 10 | public: 11 | 12 | 13 | int isPalindrome(string S) 14 | { 15 | int pal=1; 16 | int len=S.size(); 17 | int i,j; 18 | for(i=0, j=len-1; i> t; 41 | while(t--) 42 | { 43 | string s; 44 | cin >> s; 45 | 46 | Solution ob; 47 | 48 | cout << ob.isPalindrome(s) << "\n"; 49 | } 50 | 51 | return 0; 52 | } // } Driver Code Ends 53 | -------------------------------------------------------------------------------- /Competitive Coding/Copy set bits in a range.cpp: -------------------------------------------------------------------------------- 1 | int setSetBit(int x, int y, int l, int r){ 2 | int m = x; 3 | for(int i = l;i <= r;i++){ 4 | if(y & (1 << (i-1) ) ) 5 | m |= (1 << (i-1)); 6 | } 7 | return m; 8 | } 9 | -------------------------------------------------------------------------------- /Competitive Coding/Count number of bits to be flipped to convert A to B.cpp: -------------------------------------------------------------------------------- 1 | int countBitsFlip(int a, int b){ 2 | int x=a^b; 3 | int c=0; 4 | while(x>0){ 5 | x=(x&(x-1)); 6 | c++; 7 | } 8 | return c; 9 | } 10 | -------------------------------------------------------------------------------- /Competitive Coding/Count set bits in an integer.cpp: -------------------------------------------------------------------------------- 1 | int setBits(int n) { 2 | int ans=0; 3 | while(n>0){ 4 | n=(n&(n-1)); 5 | ans++; 6 | } 7 | return ans; 8 | } 9 | -------------------------------------------------------------------------------- /Competitive Coding/Count total set bits in all numbers from 1 to n.cpp: -------------------------------------------------------------------------------- 1 | int largest_power_of_2_in_range(int n){ 2 | int x=0; 3 | while((1< singleNumber(vector nums) 2 | { 3 | vectorv(2); 4 | int res=0; 5 | for(int i=0;i>1; 12 | } 13 | int mask=1<0) 17 | x^=nums[i]; 18 | } 19 | y=res^x; 20 | v[0]=min(x,y); 21 | v[1]=max(x,y); 22 | return v; 23 | } 24 | -------------------------------------------------------------------------------- /Competitive Coding/LongestCommonSubsequence.cpp: -------------------------------------------------------------------------------- 1 | int longestCommonSubsequence(string s1, string s2) { 2 | 3 | int n = s1.size(); 4 | int m = s2.size(); 5 | 6 | vector> dp(2,vector(m+1,-1)); 7 | bool bi; 8 | for(int i=0;i<=n;i++){ 9 | bi = i&1; 10 | for(int j=0;j<=m;j++){ 11 | if(i==0 or j==0) dp[bi][j]=0; 12 | else{ 13 | 14 | if(s1[i-1]==s2[j-1]) dp[bi][j] = 1 + dp[1-bi][j-1]; 15 | 16 | else dp[bi][j] = max(dp[1-bi][j],dp[bi][j-1]); 17 | 18 | 19 | } 20 | } 21 | } 22 | 23 | return dp[bi][m]; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Competitive Coding/Program to find whether a no is power of two.cpp: -------------------------------------------------------------------------------- 1 | bool isPowerofTwo(long long n){ 2 | if(n==0) 3 | return false; 4 | return ((n&(n-1))==0); 5 | } 6 | -------------------------------------------------------------------------------- /Competitive Coding/Reverse a String.cpp: -------------------------------------------------------------------------------- 1 | void reverseString(vector& s) { 2 | int j=s.size()-1; 3 | char a; 4 | for(int i=0;i<=j;i++){ 5 | a= s[i]; 6 | s[i]= s[j]; 7 | s[j]=a; 8 | j--; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Competitive Coding/coinChange.cpp: -------------------------------------------------------------------------------- 1 | int coinChange(vector& coins, int x) { 2 | 3 | vector dp(x+1,INT_MAX); 4 | 5 | dp[0]=0; 6 | 7 | for(int i=1;i<=x;i++){ 8 | for(int j=0;j=0){ 10 | long long subres = dp[i-coins[j]]; 11 | dp[i]=min(dp[i],1+subres); 12 | } 13 | } 14 | } 15 | 16 | if(dp[x]==INT_MAX) return -1; 17 | 18 | return dp[x]; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Competitive Coding/readme.md: -------------------------------------------------------------------------------- 1 | LeetCode Questions will be uploaded here. 2 | -------------------------------------------------------------------------------- /Competitive Coding/stringtask.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int main(){ 6 | 7 | string s; 8 | 9 | cin>>s; 10 | 11 | for (int i=0;i 2 | using namespace std; 3 | 4 | int main(){ 5 | 6 | long long int m,n,a,x,y,z; 7 | cin>>m>>n>>a; 8 | 9 | if(m%a==0){ 10 | x=m/a; 11 | } 12 | else{ 13 | x=m/a +1; 14 | } 15 | 16 | if(n%a==0){ 17 | y=n/a; 18 | } 19 | else{ 20 | y=n/a +1; 21 | } 22 | 23 | z=x*y; 24 | cout< 2 | class BinaryTreeNode{ 3 | public: 4 | T data; 5 | BinaryTreeNode* left; 6 | BinaryTreeNode* right; 7 | //constructor 8 | 9 | BinaryTreeNode(T data) 10 | { 11 | this->data=data; 12 | left=NULL; 13 | right=NULL; 14 | } 15 | 16 | //destructor 17 | ~ BinaryTreeNode() 18 | { 19 | delete left; 20 | delete right; 21 | } 22 | 23 | }; -------------------------------------------------------------------------------- /Data Structures and Algorithms/Binary Tree/BinaryTreeSearchUse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include"BinarySearchTree.h" 3 | using namespace std; 4 | 5 | int main() 6 | { 7 | BST t; 8 | t.insert(20); 9 | t.insert(10); 10 | t.insert(12); 11 | t.insert(14); 12 | t.insert(13); 13 | t.print(); 14 | cout< increment(ArrayList arr , int N) { 8 | int n=N; 9 | arr.set(n-1,arr.get(n-1)+1); 10 | int c=arr.get(n-1)/10; 11 | arr.set(n-1,arr.get(n-1)%10); 12 | 13 | for(int i=n-2;i>=0;i--){ 14 | if(c==1){ 15 | arr.set(i,arr.get(i)+1); 16 | c=arr.get(i)/10; 17 | arr.set(i,arr.get(i)%10); 18 | } 19 | } 20 | 21 | if(c==1){ 22 | arr.add(0,1); 23 | } 24 | return arr; 25 | 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/ProgramToImplementBinarySearch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int i, arr[10], num, first, last, middle; 6 | cout<<"Enter 10 Elements (in ascending order): "; 7 | for(i=0; i<10; i++) 8 | cin>>arr[i]; 9 | cout<<"\nEnter Element to be Search: "; 10 | cin>>num; 11 | first = 0; 12 | last = 9; 13 | middle = (first+last)/2; 14 | while(first <= last) 15 | { 16 | if(arr[middle]last) 28 | cout<<"\nThe number, "< 2 | class Node{ 3 | public: 4 | T data; 5 | Node* next; 6 | 7 | Node(T data) 8 | { 9 | this->data=data; 10 | next=nullptr; 11 | } 12 | }; -------------------------------------------------------------------------------- /Data Structures and Algorithms/Queue/queueUse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | #include"NodeClass.h" 4 | #include"queueUsingLL.h" 5 | 6 | int main() 7 | { 8 | queueUsingLL q; 9 | q.enqueue(10); 10 | q.enqueue(20); 11 | q.enqueue(30); 12 | q.enqueue(40); 13 | q.enqueue(50); 14 | cout< 2 | using namespace std; 3 | #include "StackUsingLL.cpp" 4 | 5 | int main() 6 | { 7 | stack s; 8 | s.push('a'); 9 | s.push('b'); 10 | s.push('c'); 11 | s.push('d'); 12 | s.push('e'); 13 | s.push(70); 14 | 15 | cout< 2 | using namespace std; 3 | template 4 | class TreeNode{ 5 | public: 6 | T data; 7 | vector children; 8 | 9 | TreeNode(T data) 10 | { 11 | this->data=data; 12 | } 13 | }; -------------------------------------------------------------------------------- /Data Structures and Algorithms/arrayrotation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int num, d; 7 | cin >> num >> d; 8 | int arr[num]; 9 | for (int i = 0; i < num; i++) 10 | { 11 | cin >> arr[i]; 12 | } 13 | for (int i = d; i < num; i++) 14 | { 15 | cout << arr[i] << " "; 16 | } 17 | for (int i = 0; i < d; i++) 18 | { 19 | cout << arr[i] << " "; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/average.c: -------------------------------------------------------------------------------- 1 | //KASHISH KOUL ----Enrollment no.- 03176803120// 2 | #include 3 | int main() 4 | { 5 | float sub1, sub2, sub3, sub4, sub5, total, avg; 6 | printf("Enter the marks obtained in five subjects:\n"); 7 | scanf(" %f %f %f %f %f" , &sub1, &sub2, &sub3, &sub4, &sub5); 8 | 9 | if(sub1<0 || sub2<0 || sub3<0 || sub4<0 || sub5<0) 10 | printf("Marks cannot be in negetive. PLease enter a VALID NUMBER!!!"); 11 | else if(sub1>100 || sub2>100 || sub3>100 || sub4>100 || sub5>100) 12 | printf("Marks cannot be greater than 100. PLease enter a VALID NUMBER!!!"); 13 | else 14 | { 15 | total = sub1+sub2+sub3+sub4+sub5; 16 | avg = total/5; 17 | printf("Total marks are: %.2f\n" , total , "\n"); 18 | printf("Average: %.2f\n" , avg); 19 | } 20 | return 0; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/fibonacci.c: -------------------------------------------------------------------------------- 1 | //KASHISH KOUL ----Enrollment no.- 03176803120// 2 | #include 3 | int main() 4 | { 5 | int n1 = 0, n2 = 1, n3 = 0, i; 6 | printf("Enter a Positive Number: "); 7 | scanf("%d", &i); 8 | 9 | if(i<=0) 10 | printf("WRONG INPUT!!! Please enter a POSITIVE NUMBER"); 11 | else 12 | printf("Fibonacci Series: %d, %d, ", n1, n2); 13 | n3 = n1 + n2; 14 | while (n3 <= i) 15 | { 16 | printf("%d, ", n3); 17 | n1 = n2; 18 | n2 = n3; 19 | n3 = n1 + n2; 20 | } 21 | return 0; 22 | } -------------------------------------------------------------------------------- /Data Structures and Algorithms/funccall.c: -------------------------------------------------------------------------------- 1 | //KASHISH KOUL ----Enrollment no.- 03176803120// 2 | #include 3 | int swapvalue (int , int); 4 | int swapreference (int* , int*); 5 | void main(){ 6 | int m,n ; 7 | float c; 8 | printf("Enter 1st variable = "); 9 | scanf("%d" , &m); 10 | printf("Enter 2nd variable = "); 11 | scanf("%d" , &n); 12 | swapvalue(m , n); 13 | printf("Values after calling variables by value\n"); 14 | printf("1st variable = %d \n2nd variable = %d\n" , m , n); 15 | 16 | swapreference(&m , &n); 17 | printf("Values after calling variables by reference\n"); 18 | printf("1st variable = %d \n2nd variable: = %d\n" , m , n); 19 | } 20 | int swapvalue(int x , int y){ 21 | float temp; 22 | temp = x; 23 | x = y; 24 | y = temp; 25 | return x , y ; 26 | } 27 | int swapreference(int *x , int *y){ 28 | float temp; 29 | temp = *x; 30 | *x = *y; 31 | *y = temp; 32 | return *x , *y ; 33 | } 34 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/pairofsum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n, k; 7 | cin >> n >> k; 8 | int arr[n]; 9 | bool chk; 10 | 11 | for (int i = 0; i < n; i++) 12 | { 13 | cin >> arr[i]; 14 | } 15 | for (int i = 0; i < n; i++) 16 | { 17 | for (int j = 0; j < n; j++) 18 | { 19 | if (arr[i] + arr[j] == k && arr[i] != arr[j]) 20 | { 21 | chk = true; 22 | cout << "The numbers are: " << arr[i] << " and " << arr[j] << endl; 23 | break; 24 | } 25 | } 26 | } 27 | if (chk) 28 | { 29 | cout << "true"; 30 | } 31 | else 32 | { 33 | cout << "false"; 34 | } 35 | 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/readme.text: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/selection sort in arrays.c: -------------------------------------------------------------------------------- 1 | #include 2 | int findMinIdx(int arr[], int start, int end) 3 | { 4 | int min_idx=start; 5 | int i; 6 | for(i=start+1; i<=end; i++) 7 | { 8 | if(arr[min_idx]>arr[i]) 9 | min_idx=i; 10 | } 11 | return min_idx; 12 | 13 | void display (int arr[]) 14 | { 15 | int i; 16 | for(i=0; i<=5; i++) 17 | { 18 | printf("%d", arr[i]); 19 | } 20 | } 21 | 22 | void swap (int* a, int* b) 23 | { 24 | int temp = *b; 25 | *b = *a; 26 | temp = *a; 27 | } 28 | 29 | void selection_sort(int arr[], int start, int end) 30 | { 31 | int i, int min_idx, int x; 32 | for(i=start; i<=end; i++) 33 | { 34 | min_idx=i; 35 | x=findMinIdx(arr, i, end); 36 | swap(&arr[min_idx], &arr[x]); 37 | } 38 | } 39 | 40 | void main() 41 | { 42 | int arr[6]={1,6,2,5,8,9}; 43 | selection_sort(arr, 0, 5); 44 | display(arr); 45 | } 46 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/sumofdigits.c: -------------------------------------------------------------------------------- 1 | //KASHISH KOUL ----Enrollment no.- 03176803120// 2 | #include 3 | int main() 4 | { 5 | int num , sum=0 , temp , k; 6 | printf("Enter a 3 digit number : "); 7 | scanf("%d" , &num); 8 | 9 | k = num ; 10 | 11 | while(k!=0) 12 | { 13 | temp = k % 10 ; 14 | sum = sum + temp ; 15 | k = k / 10 ; 16 | } 17 | 18 | printf("Sum of the digits of a 3 digit number is : %d\n" , sum); 19 | return 0; 20 | 21 | } 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Data Structures and Algorithms/towerofhanoi.c: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void towerOfHanoi(int n, char from_rod, 5 | char to_rod, char aux_rod) 6 | { 7 | if (n == 1) 8 | { 9 | cout << "Move disk 1 from rod " << from_rod << 10 | " to rod " << to_rod< 3 | int main() 4 | { 5 | int year; 6 | printf("Enter a year: \n"); 7 | scanf("%d" , &year); 8 | 9 | if(year%400==0) 10 | { 11 | printf("%d is a leap year. \n", year); 12 | } 13 | else if(year%100==0) 14 | { 15 | printf("%d is not a leap year. \n" , year); 16 | } 17 | else if(year%4==0) 18 | { 19 | printf("%d is a leap year. \n", year); 20 | } 21 | else 22 | { 23 | printf("%d is not a leap year. \n" , year); 24 | } 25 | return 0; 26 | } -------------------------------------------------------------------------------- /ElectricityBillCalc.py: -------------------------------------------------------------------------------- 1 | units = int(input(" Please enter Number of Units you Consumed : ")) 2 | 3 | if(units < 50): 4 | amount = units * 2.60 5 | surcharge = 25 6 | elif(units <= 100): 7 | amount = 130 + ((units - 50) * 3.25) 8 | surcharge = 35 9 | elif(units <= 200): 10 | amount = 130 + 162.50 + ((units - 100) * 5.26) 11 | surcharge = 45 12 | else: 13 | amount = 130 + 162.50 + 526 + ((units - 200) * 8.45) 14 | surcharge = 75 15 | 16 | total = amount + surcharge 17 | print("\nElectricity Bill = %.2f" %total) 18 | -------------------------------------------------------------------------------- /FarenheitToCelcius.py: -------------------------------------------------------------------------------- 1 | def convert(s): 2 | f = float(s) 3 | c = (f - 32) * 5/9 4 | return c 5 | 6 | print(convert(78)) 7 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/androidTest/java/com/example/recyclerview/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.recyclerview 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.example.recyclerview", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/java/com/example/recyclerview/Book.kt: -------------------------------------------------------------------------------- 1 | package com.example.recyclerview 2 | 3 | data class Book(val Title:String, val Url:String) -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RecyclerView 3 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/app/src/test/java/com/example/recyclerview/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.recyclerview 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /Full Stack App Development/Book App/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:7.0.2" 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31" 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | task clean(type: Delete) { 17 | delete rootProject.buildDir 18 | } -------------------------------------------------------------------------------- /Full Stack App Development/Book App/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Full Stack App Development/Book App/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Full Stack App Development/Book App/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 28 14:43:16 IST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /Full Stack App Development/Book App/settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | jcenter() // Warning: this repository is going to shut down soon 7 | } 8 | } 9 | rootProject.name = "RecyclerView" 10 | include ':app' 11 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/app/src/androidTest/java/com/example/helloworld/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.helloworld 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.example.helloworld", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Full Stack App Development/CounterApp/app/src/main/java/com/example/helloworld/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.helloworld 2 | 3 | import android.os.Bundle 4 | import android.widget.Button 5 | import android.widget.TextView 6 | import androidx.appcompat.app.AppCompatActivity 7 | 8 | class MainActivity : AppCompatActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContentView(R.layout.activity_main) 12 | 13 | val tvCount = findViewById(R.id.tvCount) 14 | val counterButton = findViewById 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Some basic C programs/area_of_circle.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | float radius, area; 6 | printf("Enter the radius of Circle(in cm) \n"); 7 | scanf("%f", &radius); 8 | area = (3.14 *radius * radius); 9 | printf("Area of Circle is : %f cm.sq", area); 10 | return 0; 11 | } -------------------------------------------------------------------------------- /Some basic C programs/area_of_square.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | float side, area; 6 | printf("Enter the Side of Square (in cm) \n"); 7 | scanf("%f", &side); 8 | area = (side * side); 9 | printf("Area of Square is : %f cm.sq", area); 10 | return 0; 11 | } -------------------------------------------------------------------------------- /Some basic C programs/avg_of_3_number.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int a,b,c; 6 | printf("Enter a Number A : \n"); 7 | scanf("%d", &a); 8 | printf("Enter a Number B : \n"); 9 | scanf("%d", &b); 10 | printf("Enter a Number C : \n"); 11 | scanf("%d", &c); 12 | printf(" Your Average of 3 Number is : %d \n",((a+b+c)/3) ); 13 | return 0; 14 | } -------------------------------------------------------------------------------- /Some basic C programs/cube_of_number.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | float num,cube; 6 | printf("Enter a number \n"); 7 | scanf("%f", &num); 8 | 9 | cube = (num*num*num); 10 | printf("Cube of your number is : %f ",cube); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /Some basic C programs/digit.c: -------------------------------------------------------------------------------- 1 | //Write a program to check if given character is digit or not. 2 | #include 3 | 4 | int main() { 5 | char ch; 6 | printf("Enter a Character : "); 7 | scanf("%c",&ch); 8 | if(ch>'0' && ch<='9'){ 9 | printf("Your Entered Character is a Digit : %c",ch); 10 | } 11 | else{ 12 | printf("Entered Character is not Digit!!"); 13 | } 14 | return 0; 15 | } -------------------------------------------------------------------------------- /Some basic C programs/divisble_by_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int num; 6 | printf("Enter a Number: "); 7 | scanf("%d", &num); 8 | printf("%d \n", num % 2 == 0); 9 | 10 | /* other version to find Even and ODD */ 11 | /* even --> 1 12 | odd -->0 */ 13 | /* int num; 14 | printf("Enter a Number: "); 15 | scanf("%d",&num); 16 | printf("%d \n", num % 2 == 0); */ 17 | 18 | return 0; 19 | } -------------------------------------------------------------------------------- /Some basic C programs/smallest.c: -------------------------------------------------------------------------------- 1 | /* Write a program to print the smallest number of two. */ 2 | #include 3 | int main(){ 4 | int a , b; 5 | printf("Enter a numbers A :"); 6 | scanf("%d",&a); 7 | printf("Enter a numbers B :"); 8 | scanf("%d",&b); 9 | if(a 2 | 3 | int main() 4 | { 5 | 6 | int a, b,sum; 7 | printf("Enter num1 \n"); 8 | scanf(" %d", &a); 9 | printf("Enter num2 \n"); 10 | scanf("%d",&b); 11 | sum = (a + b); 12 | printf("your sum of two no. is %d ", sum); 13 | return 0; 14 | } -------------------------------------------------------------------------------- /Technical Content Writing/readme.text: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /UI-UX Development/readme.text: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.44.20_PM-removebg-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.44.20_PM-removebg-preview.png -------------------------------------------------------------------------------- /Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM-removebg-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM-removebg-preview.png -------------------------------------------------------------------------------- /Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM__1_-removebg-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM__1_-removebg-preview.png -------------------------------------------------------------------------------- /Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM__2_-removebg-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Web development Projects/HolaCuians/WhatsApp_Image_2021-04-25_at_2.46.17_PM__2_-removebg-preview.png -------------------------------------------------------------------------------- /Web development Projects/HolaCuians/logo 33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/Web development Projects/HolaCuians/logo 33.png -------------------------------------------------------------------------------- /Web development Projects/Typing-Speed-Tester/README.md: -------------------------------------------------------------------------------- 1 | # Typing-Speed-Tester -------------------------------------------------------------------------------- /Web development Projects/Typing-Speed-Tester/composer.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Web development Projects/Typing-Speed-Tester/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Web development Projects/readme: -------------------------------------------------------------------------------- 1 | added two projects of mine 2 | 1.tictactoe game 3 | 2.Holacuians web page 4 | 3.Snake and Ladders game -------------------------------------------------------------------------------- /Web development Projects/snakes&ladders/board.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: black; 3 | font-family: Verdana, Geneva, Tahoma, sans-serif; 4 | color: white; 5 | } 6 | 7 | .box { 8 | position: relative; 9 | display: inline-block; 10 | height: 60px; 11 | width: 60px; 12 | margin: 10px; 13 | text-align: center; 14 | align-items: center; 15 | vertical-align: top; 16 | } 17 | .player { 18 | display: inline-block; 19 | margin: 5px; 20 | height: 15px; 21 | width: 15px; 22 | border-radius: 50px; 23 | } 24 | .one { 25 | background: #ff0000; 26 | } 27 | .two { 28 | background: #00ffff; 29 | } 30 | .snake { 31 | background: #7e1228; 32 | } 33 | .ladder { 34 | background: #098a09; 35 | } 36 | .little-text { 37 | color: #fff; 38 | font-size: 12px; 39 | } 40 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .cache 4 | .parcel-cache 5 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | TIC TAC TOE. 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tictactoe", 3 | "version": "0.1.0", 4 | "description": "", 5 | "scripts": { 6 | "start": "parcel index.html", 7 | "build": "parcel build index.html" 8 | }, 9 | "license": "MIT", 10 | "dependencies": { 11 | "react": "^16.13.1", 12 | "react-dom": "^16.13.1" 13 | }, 14 | "devDependencies": { 15 | "@parcel/transformer-sass": "^2.0.0-beta.2", 16 | "babel-preset-nano-react-app": "^0.1.0", 17 | "parcel": "^2.0.0-alpha.3.2" 18 | }, 19 | "babel": { 20 | "presets": [ 21 | "nano-react-app" 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/src/components/History.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const History = ({ history, moveTo, currentMove }) => { 4 | return ( 5 |
6 |
    7 | {history.map((_, move) => { 8 | return ( 9 |
  • 10 | 19 |
  • 20 | ); 21 | })} 22 |
23 |
24 | ); 25 | }; 26 | 27 | export default History; 28 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/src/components/Square.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Square = ({ value, onClick, isWinningSquare }) => { 4 | return ( 5 | 14 | ); 15 | }; 16 | 17 | export default Square; 18 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/src/helpers.js: -------------------------------------------------------------------------------- 1 | export function calculateWinner(squares) { 2 | const lines = [ 3 | [0, 1, 2], 4 | [3, 4, 5], 5 | [6, 7, 8], 6 | [0, 3, 6], 7 | [1, 4, 7], 8 | [2, 5, 8], 9 | [0, 4, 8], 10 | [2, 4, 6], 11 | ]; 12 | for (let i = 0; i < lines.length; i++) { 13 | const [a, b, c] = lines[i]; 14 | if (squares[a] && squares[a] === squares[b] && squares[a] === squares[c]) { 15 | return { 16 | winner: squares[a], 17 | winningSquares: [a, b, c], 18 | }; 19 | } 20 | } 21 | return { 22 | winner: null, 23 | winningSquares: [], 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /Web development Projects/tictactoe/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import App from "./App"; 4 | 5 | ReactDOM.render(, document.getElementById("root")); 6 | -------------------------------------------------------------------------------- /binary.cpp: -------------------------------------------------------------------------------- 1 | /* C++ Program to Convert Decimal Number to Binary */ 2 | 3 | #include 4 | 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | int d,n,i,j,a[50]; 10 | cout<<"Enter any Decimal number :: "; 11 | cin>>n; 12 | 13 | cout<<"\nThe binary conversion of [ "<0;--j) 23 | cout< 4 | using namespace std; 5 | int main(){ 6 | 7 | float a, b; //two float data type variables a and b 8 | char op; //char data type variable op 9 | 10 | cout<<"Enter the operation(+,-,*,/) : "; 11 | cin>>op; 12 | 13 | cout<<"Enter first number : "; 14 | cin>>a; 15 | 16 | cout<<"Enter second number : "; 17 | cin>>b; 18 | 19 | switch(op){ 20 | case '+': 21 | cout<<"Summation ="< 2 | 3 | 4 |
5 |

6 | 7 | 8 | 9 | 10 | 14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /java/BubbleSort.java: -------------------------------------------------------------------------------- 1 | 2 | class BubbleSort 3 | { 4 | void bubbleSort(int arr[]) 5 | { 6 | int n = arr.length; 7 | for (int i = 0; i < n-1; i++) 8 | for (int j = 0; j < n-i-1; j++) 9 | if (arr[j] > arr[j+1]) 10 | { 11 | // swap arr[j+1] and arr[j] 12 | int temp = arr[j]; 13 | arr[j] = arr[j+1]; 14 | arr[j+1] = temp; 15 | } 16 | } 17 | 18 | void printArray(int arr[]) 19 | { 20 | int n = arr.length; 21 | for (int i=0; i target) 21 | end = mid - 1; 22 | else if (val < target) 23 | start = mid + 1; 24 | else 25 | end = mid; 26 | } 27 | 28 | if (nums[end] == target) 29 | result = end; 30 | 31 | return result; 32 | } 33 | } -------------------------------------------------------------------------------- /java/First Position of Target/helper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/java/First Position of Target/helper.class -------------------------------------------------------------------------------- /java/First Position of Target/helper.java: -------------------------------------------------------------------------------- 1 | public class helper { 2 | public static void main(String[] args) { 3 | Solution solution = new Solution(); 4 | 5 | // int[] A = { 1, 2, 3, 3, 4, 5, 10 }; 6 | int[] A = {1,4,4,5,7,7,8,9,9,10}; 7 | 8 | // System.out.println(solution.binarySearch(A, 3)); 9 | System.out.println(solution.binarySearch(A, 1)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /java/First Position of Target/readme.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | Given a sorted array (ascending order) and a target number, find the first index of this number in O(log n)O(logn) time complexity. 3 | 4 | If the target number does not exist in the array, return -1. 5 | ## Example 6 | ### Example 1: 7 | Input: 8 |
 9 | tuple = [1,4,4,5,7,7,8,9,9,10]
10 | target = 1
11 | 
12 | Output: 13 |
14 | 0
15 | 
16 | Explanation: 17 | 18 | The first index of 1 is 0. 19 | ### Example 2: 20 | Input: 21 |
22 | tuple = [1, 2, 3, 3, 4, 5, 10]
23 | target = 3
24 | 
25 | Output: 26 |
27 | 2
28 | 
29 | Explanation: 30 | 31 | The first index of 3 is 2. 32 | ## Challenge 33 | If the count of numbers is bigger than 2^32, can your code work properly? -------------------------------------------------------------------------------- /java/First Position of Target/solution.md: -------------------------------------------------------------------------------- 1 | 在一个有序数组中找到某个数字出现的第一个位置。 2 | ### 3 | 依然是二分查找。但是找到匹配项不算完。还要继续找。此类题目比较标准的问法是找第一个,还是最后一个。区别在于当nums[mid] == target时,如果找第一个,就end = mid。此时target肯定会是end或者end的左侧,因此只会移动start。end再动的时候,只有当mid的值再次为target时。所以最终start和end相遇的时候,start的位置如果是target,那么start就是结果。 4 | ### 5 | Last Position不太一样。首先如果相等,start = mid。其次由于除以二取整问题(下取整),start+ 1=end时就应该结束,然后先后判断end和start是不是符合target。此时要注意start是否越过上边界(length)和end是否越过下边界(0)。 -------------------------------------------------------------------------------- /java/InvertedCommas.java: -------------------------------------------------------------------------------- 1 | class InvertedCommas { 2 | 3 | public static void main(String[] args) { 4 | 5 | System.out.println(); 6 | System.out.println("\"Can we print '\\' with System.out.println() statement?\""); 7 | System.out.println("010_Sarthak_Maheshwari_IT-3"); 8 | 9 | } 10 | 11 | } -------------------------------------------------------------------------------- /java/Lab4Q6.java: -------------------------------------------------------------------------------- 1 | package Lab4; 2 | 3 | public class Lab4Q6 { 4 | 5 | private int l; 6 | private int b; 7 | 8 | public Lab4Q6 (int l, int b) { 9 | this.l=l; 10 | this.b=b; 11 | } 12 | 13 | public int getL() { 14 | return l; 15 | } 16 | 17 | public int getB() { 18 | return b; 19 | } 20 | 21 | public static void main(String args[]) 22 | { 23 | Lab4Q6 p= new Lab4Q6(20,30); 24 | double area=p.getL()*p.getB(); 25 | System.out.println("Area with length "+p.getL()+" and breath "+p.getB()+" is "+area); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /java/MergeSort.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | import java.util.Arrays; 4 | 5 | public class MergeSort { 6 | public static void main(String[] args) { 7 | int[] arr1= {1,4,8,10,13,17}; 8 | int[] arr2= {2,3,5,7,9,11,12}; 9 | int arr3[]=mergerSort(arr1,arr2); 10 | System.out.println(Arrays.toString(arr3)); 11 | } 12 | 13 | public static int[] mergerSort(int[] arr1, int[] arr2) { 14 | int[] arr=new int[arr1.length+arr2.length]; 15 | int i=0,j=0,k=0; 16 | 17 | while(i= 0; i--) { 15 | reverse = reverse + original.charAt(i); 16 | } 17 | 18 | if(original.equals(reverse)) { 19 | System.out.println("String is palindrome"); 20 | System.out.println("010_Sarthak_Maheshwari_IT-3"); 21 | } 22 | else { 23 | System.out.println("String is not palindrome"); 24 | System.out.println("010_Sarthak_Maheshwari_IT-3"); 25 | } 26 | 27 | } 28 | 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /java/PrimeNumber.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | class PrimeNumber { 4 | 5 | public static void main(String[] args) { 6 | 7 | Scanner sc = new Scanner(System.in); 8 | 9 | System.out.println(); 10 | System.out.print("Enter the number: "); 11 | int n = sc.nextInt(); 12 | 13 | System.out.println("Prime numbers between 1 to " + n + " are "); 14 | 15 | for(int i=2; i <= n; i++) { 16 | 17 | int count = 0; 18 | 19 | for(int j=2; j <= i/2; j++) { 20 | if(i % j == 0) { 21 | count++; 22 | break; 23 | } 24 | } 25 | 26 | if(count == 0) { 27 | System.out.print(i + " "); 28 | } 29 | 30 | } 31 | System.out.println(); 32 | System.out.println("010_Sarthak_Maheshwari_IT-3"); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /java/PrimeNumbers2.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.Scanner; 3 | class PrimeNumbers2 4 | { 5 | public static void main (String[] args) 6 | { 7 | 8 | Scanner scanner = new Scanner(System.in); 9 | int i =0; 10 | int num =0; 11 | //Empty String 12 | String primeNumbers = ""; 13 | 14 | System.out.println("Enter the value of n:"); 15 | int n = scanner.nextInt(); 16 | scanner.close(); 17 | for (i = 1; i <= n; i++) 18 | { 19 | int counter=0; 20 | for(num =i; num>=1; num--) 21 | { 22 | if(i%num==0) 23 | { 24 | counter = counter + 1; 25 | } 26 | } 27 | if (counter ==2) 28 | { 29 | //Appended the Prime number to the String 30 | primeNumbers = primeNumbers + i + " "; 31 | } 32 | } 33 | System.out.println("Prime numbers from 1 to n are :"); 34 | System.out.println(primeNumbers); 35 | } 36 | } -------------------------------------------------------------------------------- /java/QuickSort.java: -------------------------------------------------------------------------------- 1 | import java.util.Arrays; 2 | 3 | public class QuickSort { 4 | 5 | public static void main(String[] args) { 6 | 7 | int[] arr= {15,9,7,13,12,16,4,18,11}; 8 | int leng =arr.length; 9 | QuickSort qsm=new QuickSort(); 10 | qsm.quicksortRecursion(arr,0,leng-1); 11 | System.out.println(Arrays.toString(arr)); 12 | 13 | } 14 | 15 | int partition(int []arr,int low,int high) 16 | { 17 | int pivot=arr[(low+high)/2]; 18 | 19 | while(low<=high) 20 | { 21 | while(arr[low]pivot) 25 | high--; 26 | 27 | if(low<=high) 28 | { 29 | int temp=arr[low]; 30 | arr[low]=arr[high]; 31 | arr[high]=temp; 32 | low++;high--; 33 | } 34 | } 35 | return low; 36 | } 37 | void quicksortRecursion(int[] arr,int low,int high) 38 | { 39 | int pi=partition(arr,low,high); 40 | if(low left_max) 13 | left_max = arr[i]; 14 | 15 | temp[i] = left_max; 16 | } 17 | 18 | 19 | int right_max = arr[arr.length-1]; 20 | for(int i=arr.length-1; i>=0; i--) { 21 | if(arr[i] > right_max) 22 | right_max = arr[i]; 23 | 24 | temp[i] = Math.min(temp[i], right_max); 25 | } 26 | 27 | 28 | int count = 0; 29 | for(int i=0; i< arr.length; i++) { 30 | temp[i] = temp[i]-arr[i]; 31 | count+=temp[i]; 32 | } 33 | 34 | System.out.println(count); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /java/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /java/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: blue; 3 | text-align: center; 4 | } 5 | h1{ 6 | font-size: larger ; 7 | color: coral; 8 | } 9 | button{ 10 | cursor: pointer; 11 | padding: 12px 16px; 12 | border-radius: 7px; 13 | color: rgb(216, 73, 139); 14 | } -------------------------------------------------------------------------------- /oops/1.oop.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/1.oop.exe -------------------------------------------------------------------------------- /oops/2.1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/2.1.exe -------------------------------------------------------------------------------- /oops/2.2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/2.2.exe -------------------------------------------------------------------------------- /oops/2.3.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // with initialiser list 3 | ////////////////////////////////////////////// 4 | 5 | #include 6 | using namespace std; 7 | class Test 8 | { 9 | public: 10 | Test() 11 | { 12 | cout << "Default " << endl; 13 | } 14 | Test(int x) 15 | { 16 | cout << "Parameterised " << endl; 17 | } 18 | }; 19 | class Main 20 | { 21 | public: 22 | Test t; 23 | Main() : t(10) // Main(): t() to initialise with default constructor 24 | { 25 | } 26 | }; 27 | int main() 28 | { 29 | Main m; 30 | return 0; 31 | } 32 | // o/p parameterised 33 | // this is the performance advantaage of initialiser list method . initialization only happens only one time. -------------------------------------------------------------------------------- /oops/2.3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/2.3.exe -------------------------------------------------------------------------------- /oops/2.constructor and destructor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/2.constructor and destructor.exe -------------------------------------------------------------------------------- /oops/3.1 copy constructor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/3.1 copy constructor.exe -------------------------------------------------------------------------------- /oops/3.copy constructor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/3.copy constructor.exe -------------------------------------------------------------------------------- /oops/4.destructor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/4.destructor.exe -------------------------------------------------------------------------------- /oops/5.this_pointer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/5.this_pointer.exe -------------------------------------------------------------------------------- /oops/6.Static members.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/6.Static members.exe -------------------------------------------------------------------------------- /oops/7.1.virtual functions.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/7.1.virtual functions.exe -------------------------------------------------------------------------------- /oops/7.2.virtual functions.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | class Base{ 4 | public: 5 | int x=1; 6 | int y=10; 7 | virtual void print(){ 8 | cout<<"base "<x<<" "<y< 2 | using namespace std; 3 | class Base 4 | { 5 | public: // here change is made 6 | int x; 7 | Base(int a) : x(a) { cout << "base" << endl; } 8 | }; 9 | class Derived : public Base 10 | { 11 | private: 12 | int y; 13 | 14 | public: 15 | Derived(int a, int b) : Base(a), y(b) 16 | { 17 | cout << "Derived " << endl; 18 | } 19 | void print() { cout << "x : " << x << " y : " << y << endl; } 20 | }; 21 | int main() 22 | { 23 | // Derived d(10); 24 | Derived d(10, 20); 25 | d.print(); 26 | cout << d.x; // valid because is now a public member 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /oops/8.1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/8.1.exe -------------------------------------------------------------------------------- /oops/8.inheritance example.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/8.inheritance example.exe -------------------------------------------------------------------------------- /oops/9.multiple inheritance.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | class A 4 | { 5 | public: 6 | int x; 7 | A() 8 | { 9 | cout << "A" << endl; 10 | } 11 | }; 12 | class B : public A 13 | { 14 | public: 15 | B() 16 | { 17 | cout << "B" << endl; 18 | } 19 | }; 20 | class C : public A 21 | { 22 | public: 23 | C() 24 | { 25 | cout << "C" << endl; 26 | } 27 | }; 28 | class D : public B, public C 29 | { 30 | public: 31 | D() 32 | { 33 | cout << "D" << endl; 34 | } 35 | } d; 36 | int main() 37 | { 38 | 39 | // cout << d.x; 40 | return 0; 41 | } -------------------------------------------------------------------------------- /oops/9.multiple inheritance.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/9.multiple inheritance.exe -------------------------------------------------------------------------------- /oops/oop sample 2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | class Sample 4 | { 5 | public: 6 | int x; 7 | int y; 8 | Sample(int x, int y) 9 | { 10 | this->x = x; 11 | this->y = y; 12 | } 13 | }; 14 | int main() 15 | { 16 | Sample S1(1, 2); 17 | Sample *ptr; 18 | ptr = &S1; 19 | cout << ptr << endl; 20 | // cout << *ptr; you cant derefence a ptr to a class/structure 21 | 22 | return 0; 23 | } -------------------------------------------------------------------------------- /oops/oop sample 2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/oop sample 2.exe -------------------------------------------------------------------------------- /oops/oop sample1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | class Sample 4 | { 5 | public: 6 | int x; 7 | }; 8 | int main() 9 | { 10 | Sample S; 11 | cout << S.x; 12 | 13 | return 0; 14 | } -------------------------------------------------------------------------------- /oops/oop sample1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bread-board-coding/Hacktober_Fest_2021/460cf069bf9ee97cfe5962d79bbaaae40eb767d2/oops/oop sample1.exe -------------------------------------------------------------------------------- /prime.py: -------------------------------------------------------------------------------- 1 | #prime numbers in given range 2 | n1= int(input("Enter number 1")) 3 | n2= int(input("Enter number 2")) 4 | for i in range(n1, n2+1): 5 | for j in range(2, i): 6 | if i % j == 0: 7 | break 8 | else: 9 | print(i) --------------------------------------------------------------------------------