Skip to content

Conversation

@gauravag091
Copy link

program in python to implement heap sort with proper comments

TheCodeyWizard and others added 30 commits October 4, 2022 12:46
MergeSort & MergeSortInPlace in JAVA
Updated QuickSort by adding Recusion.
Display Affirmations Using Turtle Graphics
Anurag2622002 and others added 30 commits October 4, 2022 22:31
Binary search requires an sorted array, traversing though it, the algorithim finds the matching given element in the array, and returns the index of the element.
Insertion sort algorithim works by  comparing every key to it's predecessor, elements are compared multiple times though the algorithim.
Backtracking Problem Rat in Maze using C++
Tower of Hanoi Problem using Recursion in C++
Create lengthOfLongestSubstring.java
This is an implementation of the most efficient approach to finding the median value of two sorted Arrays of different sizes.
Time Complexity is O(min(log n1, log n2)) while Space Complexity is O(1).
Create Median_of_TwoSortedArrays_OptimisedCode.cpp
This is a program implementation to find the sum of elements of the Array between k1 Smallest and k2 Smallest elements in the Array.
Time Complexity: O(n logk) + O(n) .
  [ O(n logk) to find the kth Smallest element and O(n) to find the sum of in between elements in the array]
Create SumOfElements_between_k1Smallest_and_k2SmallestElements.cpp
This is a program implementation in C++ to find the peak element in an Array. If the array contains more than one peak element then this program will return any of the peak elements present in the Array.
Time Complexity: O(log n), where n is the number of elements in the Array.
Space Complexity: O(1), as no extra space is used.
This is an implementation program in C++ to print the Top k frequent Numbers in a given array.
Time Complexity: O( k logd + d logd) 
[ To remove the top of the priority queue O(log d) time is required, so if k elements are removed then O(k log d) time is required, and 
To construct a priority queue with d elements, O(d logd) time is required] 

Space Complexity: O(d), where d is the count of distinct elements in the Array.
Create Top_k_Frequent_Numbers_InAnArray.cpp
I had added program to sort an input array in wave form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.