Aswin Bennyblog.aswinbenny.in·Oct 7, 2024Hash Data StructuresIntro Hash Set vs Hash Map Hash Set or unordered_set No values, just keys Used to check if a key exists or not Hash Map or unordered_map Value is also included Used to check if a key exists and also get its value Ordered Map vs Unordere...DiscussData Structuresdata structures
Vishad Patelvishad.hashnode.dev·Aug 4, 2024Leetcode Two Sum Problem Explained: A Simple GuideImagine you have an array of numbers called nums and a number called target. Your job is to find the indices of the two numbers that add up totarget. You can assume there's always one solution, and you can't use the same number twice. Feel free to re...DiscussDSA Problem And Solutionleetcode
Aditya Fulzelenemo210399.hashnode.dev·Jun 10, 2024LeetCode : 1. Two Sum SolutionProblem Statement: Given an array of integers nums and an integer target, return the indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twic...Discuss·1 likeBlind 75 array
Gulshan Kumarperfinsights.hashnode.dev·May 26, 2024Most Common WordGiven a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at least one word that is not banned, and that the answer is unique. The words in paragraph are case-i...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Apr 6, 2024Sort the PeopleYou are given an array of strings names, and an array heights that consists of distinct positive integers. Both arrays are of length n. For each index i, names[i] and heights[i] denote the name and height of the i<sup>th</sup> person. Return names so...DiscussJava Solutionarray
Gulshan Kumarperfinsights.hashnode.dev·Feb 25, 2024Find the Length of the Longest Common PrefixYou are given two arrays with positive integers arr1 and arr2. A prefix of a positive integer is an integer formed by one or more of its digits, starting from its leftmost digit. For example, 123 is a prefix of the integer 12345, while 234 is not. A ...DiscussJava Solutionarray
Samuelcodetree3.hashnode.dev·Feb 10, 2024Hash Tables In CHash tables are a data structure that seek to solve the time complexity problem of arrays and linked lists. With arrays and linked lists, one has to traverse through the lists in order to get the particular element they are looking for. This leads to...DiscussHashing
Gulshan Kumarperfinsights.hashnode.dev·Feb 1, 2024Set MismatchYou have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another ...DiscussJava Solutionarray
Prasoon Abhinawblog.pabhinaw.dev·Aug 20, 2023Mastering C#: Unraveling the Concepts of C# & OOPSWhat is List<T> The List<T> is a collection of strongly typed objects that can be accessed by index and having methods for sorting, searching, and modifying list. It is the generic version of the ArrayList that comes under System.Collections.Generic ...DiscussC#
Jyotirmoy Barmanjyotirmoy.dev·Aug 11, 2023Top K Frequent Elements - Leetcode 347Problem - Leetcode Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1]...Discuss·80 readsLeetodehashtables