Back to Browse

Next Greater Element I ❤️ Leetcode solution explained Hindi interview placements DSA Hello World

30.1K views
Mar 5, 2022
19:19

This is the video under the series of DATA STRUCTURE & ALGORITHM in a STACK Playlist. Now we are going to solve a stack problem Next Greater Element I from Leetcode and geeksforgeeks Explained Hindi. Join My Telegram channel for more Updates: https://telegram.me/helloworldbyprince complete DSA preparation: https://github.com/Prince-1501/Complete-DSA-Preparation ---------------------------------------------------------------------------------------- ► 496. Next Greater Element I The next greater element of some element x in an array is the first greater element that is to the right of x in the same array. You are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2. For each 0 = i nums1.length, find the index j such that nums1[i] == nums2[j] and determine the next greater element of nums2[j] in nums2. If there is no next greater element, then the answer for this query is -1. Return an array ans of length nums1.length such that ans[i] is the next greater element as described above. Input: nums1 = [4,1,2], nums2 = [1,3,4,2] Output: [-1,3,-1] Explanation: The next greater element for each value of nums1 is as follows: - 4 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1. - 1 is underlined in nums2 = [1,3,4,2]. The next greater element is 3. - 2 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1. ►Next Greater Element I: https://leetcode.com/problems/next-greater-element-i/ ► Code In this video: https://github.com/Prince-1501/Hello_world-Competiitve-Programming/blob/master/Leetcode/stack/Next%20Greater%20Element%20I.cpp ---------------------------------------------------------------------------------------- *Follow me * LinkedIn► https://www.linkedin.com/in/iamprince/ Facebook► https://www.facebook.com/helloworldofficials/ Instagram► https://www.instagram.com/helloworldbyprince/ Twitter► https://twitter.com/prince_king_ Telegram► https://telegram.me/helloworldbyprince ---------------------------------------------------------------------------------------- ►Our Playlists on:- ► Tree: https://youtube.com/playlist?list=PLzjZaW71kMwQ-JABTOTypnpRk1BnD2Nx4 ► Stack: https://youtube.com/playlist?list=PLzjZaW71kMwRTtDWYVPvkJypUpKWbuT7_ ► Hashing: https://youtube.com/playlist?list=PLzjZaW71kMwQ-D3oxCEDHAvYu8VC1XOsS ► Graph: https://youtube.com/playlist?list=PLzjZaW71kMwSrxEtvK5uQnfNQ9UjGGzA- ► Matrix: https://youtube.com/playlist?list=PLzjZaW71kMwRff0CCcrB93srEiQhJoOzg ► STL: https://youtube.com/playlist?list=PLzjZaW71kMwR-oGkXfxfz4dmVe2dkNh0K ► Leetcode: https://youtube.com/playlist?list=PLzjZaW71kMwQRAtBdJAq3u64ZEw-0wxgI ►Competitive Programming: https://youtube.com/playlist?list=PLzjZaW71kMwTGbP1suqY16w1VSb9ZNuvE ►C++ Full Course : https://youtube.com/playlist?list=PLzjZaW71kMwRba0ojzshdrmR_NueVeMJv ►Algorithms: https://www.youtube.com/watch?v=7aB650S72CQ&list=PLzjZaW71kMwQWnV474_y1twD9_5qS85Mu ►Data Structure: https://www.youtube.com/playlist?list=PLzjZaW71kMwQVEuI4I0Yj0NnsV-km-Jt_ ------------------------------------------------------------------------ 🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟 ✨ Tags ✨ leetcode problems leetcode problems java leetcode problems python leetcode problems that got me tired leetcode problems c++ leetcode problems and solutions python leetcode problems playlist leetcode problems and solutions java leetcode problems in Hindi leetcode problems javascript leetcode problems and solutions leetcode problems of the day leetcode problems for beginners leetcode problems easy leetcode problems js Introduction to the graph data structure stack practice problems stack practice problems gfg leetcode stack questions leetcode stack queue stack hello world next greater element leetcode solution next greater element gfg next greater element question asked in Google off-campus placement next greater element using stack next greater element 1 leetcode c++ Practice stack data structure Stack in a data structure in Hindi Stack Full playlist for Beginners algorithms graph data structure sorting algorithms algorithm analysis gate computer science preparation programming languages #stack #Leetcode #interview

Download

0 formats

No download links available.

Next Greater Element I ❤️ Leetcode solution explained Hindi interview placements DSA Hello World | NatokHD