Posts

Showing posts with the label Python

DC's DSA-CRACKER #6 | Array | Find union and intersection of 2 Sorted Arrays

Image
Array  This is a part of the 450 DSA question set to check the Excel sheet link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question  : Given 2 unsorted arrays A, and B, find the union and intersection of these arrays. and solve it in less than O(m*n) time Complexity. (Best Solution can be via the use of a SET) Explanation Video CODE Tip: Check the code from the GITHUB Repo to Download the Code of all Existing Questions Solved at Once Python     Credit (for the Collection of Questions) :  The Excel sheet is made by Mr.Love Babbar check him out on YT too (After Subscribing to my channel too First ✌) Want to Contribute? Add Your GitHub Repo with the solution in other Programming Languages (C, CPP, Java, etc....)

DC's DSA-CRACKER #5 | Array | Move all Negative numbers to one side of the Array

Image
Array  This is a part of the 450 DSA question set to check the Excel sheet link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question  : Move all negative numbers to the beginning and all positive numbers to the end while using constant extra space. Explanation Video CODE Tip: Check the code from the GITHUB Repo to Download the Code of all Existing Questions Solved at Once Python     Credit (for the Collection of Questions) :  The Excel sheet is made by Mr.Love Babbar check him out on YT too (After Subscribing to my channel too First ✌) Want to Contribute? Add Your GitHub Repo with the solution in other Programming Languages (C, CPP, Java, etc....)

DC's DSA-CRACKER #4 | Array | Sort the array without using a sorting algorithm

Image
Array  This is a part of the 450 DSA question set to check the Excel sheet link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question  : Given an array of size N containing only 0s, 1s, and 2s; sort the array in ascending order without using a conventional sorting algorithm. Explanation Video CODE Tip: Check the code from the GITHUB Repo to Download the Code of all Existing Questions Solved at Once Python     Credit (for the Collection of Questions) :  The Excel sheet is made by Mr.Love Babbar check him out on YT too (After Subscribing to my channel too First ✌) Want to Contribute? Add Your GitHub Repo with the solution in other Programming Languages (C, CPP, Java, etc....)

DC's DSA-CRACKER #3 | Array | Kth Maxima and Minima in an Array

Image
Array  This is a part of the 450 DSA question set to check the Excel sheet link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question  : Given an array and an integer K where K is smaller than the size of the array, find the Kth smallest element in the given array, given that all the elements in the array are distinct. Explanation Video CODE Tip: Check the code from the GITHUB Repo to Download the Code of all Existing Questions Solved at Once Python     Credit (for the Collection of Questions) :  The Excel sheet is made by Mr.Love Babbar check him out on YT too (After Subscribing to my channel too First ✌) Donation Link :  If You want to Donate for the effort of making these Solutions out for free and not making a course/Selling it on websites etc please consider it! Donate Here Want to Contribute? Add Your GitHub Re...

DC's DSA-CRACKER #2 | Array | Maxima and Minima in Array

Image
Array  This is a part of the 450 DSA question set to check the Excel sheet link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question  : Maximum and Minimum Element in an Array Write a Function that finds out the maximum and minimum element inside an array via the minimum comparisons possible and in the most minimal Space and Time Complexity. Explanation Video CODE Tip: Check the code from the GITHUB Repo to Download the Code of all Existing Questions Solved at Once Python     Credit (for the Collection of Questions) :  The Excel sheet is made by Mr.Love Babbar check him out on YT too (After Subscribing to my channel too First ✌) Donation Link :  If You want to Donate for the effort of making these Solutions out for free and not making a course/Selling it on websites etc please consider it! Donate Here Want to Contri...

DC's DSA-CRACKER #1 | Array | REVERSE THE ARRAY

Image
  Array  This is a part of the 450 DSA question set to check the  Excel sheet  link to see the Links to GFG, Questions, Explanation/Solving Video, or other Blog for the Question: https://drive.google.com/file/d/1L3EOLDMs-Fx2XoKclkCg1OVymDGh6psP/view?usp=sharing Question:  Reverse the Given Array   Example :   I/P : [1,2,3,4,5,6,7] O/P : [7,6,5,4,3,2,1]   Question Reference Link : https://www.geeksforgeeks.org/write-a-program-to-reverse-an-array-or-string/ Explanation Video CODE Tip: Check the code from the  GITHUB Repo  to Download the Code of all Existing Questions Solved at Once Python   Credit (for the Collection of Questions)  :  The Excel sheet is made by Mr.Love Babbar check him out on  YT  too (After Subscribing to my channel too First ✌) Donation Link :  If You want to Donate for the effort of making these Solutions out for free and not making a course/Selling it on website...

How to NOT write UGLY CODE ? | PEP-8 | Python Enhancement Proposals | VS-Code Plugins | autopep8 | Prettier | Preffered Settings

Image
WRITE BEAUTIFULL CODE In this blog, you will be guided on how to use Aotopep8 a VScode plugin so that you can follow the PEP-8 (Python Enhancement Proposal -8) which tells us about how to make the code generic and more readable so that it follows some specific Guidelines set by the Community. LINK TO EXPLANATION  : Please feel free to watch the explanation. If there is any Doubt and post it in the comment section. The step by step guide will also be below : WHAT IS PEP-8 Pep-8 is the most popular Python enhancement Proposal in which it has been clearly specified on how to follow some specific rules to make your code FORMAL, and more PRESENTABLE. You can visit and read the exact proposal given on  Python.org   (it is not preferred to read all the rules as the document i9s quite long and complex)  Some of the basic conventions are : Method names should be all lower case Words in a method name should be separated by an underscore The non-public method should begin w...