leet code

Amortised Time complexity , and there method to find

What is amortised time complexity and method to calculate? Amortized time complexity is a measure of the efficiency of an algorithm that takes into account the average time taken by the algorithm over a sequence of operations, rather than just the worst-case or best-case time complexity. One method for calculating the amortized time complexity of

Amortised Time complexity , and there method to find Read More »

Binary Trees – Data structure – Nilesh blog.tech

What are Binary Trees? A binary tree is a tree data structure in which each node has at most two children. The children are referred to as the left child and the right child.Binary trees are commonly used to implement binary search trees and binary heaps. They have several useful properties, such as the ability

Binary Trees – Data structure – Nilesh blog.tech Read More »

Leet Code 55. Tackling Jump I , II , III , IV Game | Cpp ,Java ,Python – Day 3

leetcode question solution

Leet Code 55.:In this post, we’ll look at two jump game difficulties offered on Leet Code 55. These are well-known coding tasks that might be difficult to complete in a single attempt.We’ll go over numerous approaches to solving both issues step by step using complexity analysis. So, let’s begin with the first. Day 3 Coding

Leet Code 55. Tackling Jump I , II , III , IV Game | Cpp ,Java ,Python – Day 3 Read More »

Day 2 : FaceBook Asked interview Quetion :- Add Binary Sum – Java ,Python ,Cpp

leetcode question solution

If, you are preperaing for FACEBOOK Interview or will prepare. Then according to LeetCode premium it is no.4 most asked Question by Facebook as per now. Nilesh Most important QUOTE… So Ladies n Gentlemen without any further due let’s start,What question saying is, Given two binary strings a and b, return their sum as a binary string. Explanation of Approach: Explanation

Day 2 : FaceBook Asked interview Quetion :- Add Binary Sum – Java ,Python ,Cpp Read More »

Leet Code : Intersection of Two Linked ListsLeet Code – Java | Python | C++ | Dart | Easy Solution

leetcode question solution

Find the location where two linked lists intersect. Find the node where the two linked lists cross when there are two of them and the tail of the second list points to a node in the first list. Take into account the linked lists below, where the fourth node of the first list is connected

Leet Code : Intersection of Two Linked ListsLeet Code – Java | Python | C++ | Dart | Easy Solution Read More »

How to Prepare for a Google Software Engineer Interview – Nileshblog.Tech

Most engineers dream of working with Google at some point in their life. But preparing for the Google software engineer interview takes dedicated and consistent effort. Do you also want to know what it takes to join Google as a Software Engineer? Do you want to work for your dream company? Read on to know

How to Prepare for a Google Software Engineer Interview – Nileshblog.Tech Read More »

Leet Code : Trapping Rain Water Solution Java | CPP | JS

leetcode question solution

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. CPP solution

Leet Code : Trapping Rain Water Solution Java | CPP | JS Read More »

Leet Code : Validate Binary Search Tree Java | CPP | Python solution

leetcode question solution

Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: Input: root = [2,1,3] Output: true Solution : Java DFS : Python : CPP : Inorder solution :

Leet Code : Validate Binary Search Tree Java | CPP | Python solution Read More »

Leet Code : Maximum Score from Performing Multiplication Operations Cpp | Java | Python solution

leetcode question solution

Two integer arrays, nums and multipliers, of sizes n and m, respectively, are provided to you, where n >= m. The arrays are all one-dimensional. You start with a score of zero. You need to carry out precisely m operations. On the ith (1-indexed) action, you will: Choose one integer x from the beginning or

Leet Code : Maximum Score from Performing Multiplication Operations Cpp | Java | Python solution Read More »

LeetCode 15 : Three (3) Sum

leetcode question solution

LeetCode 15. Pattern: Hey there, coding enthusiasts! Welcome back to another exciting coding session. Today’s problem is a treat—literally! We’re going to solve the “three sum” or “LeetCode .15” Approaches Two-Pointer Approach: 1. Sorting the Array 2. Initialization 3. Handling Edge Case 4. Main Loop Over Array 5. Duplicate Check 6. Two-Pointer Approach 7. Finding

LeetCode 15 : Three (3) Sum Read More »