Problem Statement:- Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. The order of elements can be changed. It doesn’t matter what you leave beyond…
Author: Admin
Leet Code 20 java: Valid Parentheses Algorithm
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp. Example: Logic: Given String:- Step 1:- Take this String as an input of the function. This Function will return the Boolean. Step 2: Check all the opening brackets…
What is Programming Language?
Computer programming language is a medium to communicate with the computers. To give the instructions to the computer. Because computer only can understand the machine language, that is in terms of zeros and ones or in terms of on and off (Byte Codes). But it’s really tough for us to write byte codes. That is…
Merge Two Sorted Lists : Leet Code Solution
Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists. Ans:- To solve this approach, we will create a Dummy Head. And as the two given list will be sorted, so we have to only compare the individual…
Big O Notation
I want to explain it in a few simple words. Basically this is a tool to express how efficient your algorithm is. One point we need to remember that, the efficiency of an algorithm is very much relative, because it depends on many other factors like number of programs or process is currently running, the…
SQL LeetCode 183: Customers Who Never Order
Solution:
SQL LeetCode 182: Duplicate Emails
Solution:-
SQL Leetcode 181: Give the Name of Employees Earning More Than Their Managers
Solution:-
Problems and Solutions on Java Lambda Expressions
Q1. Print one simple text using the Lambda Expression (One Argument is passed inside the argument list). Ans:- Q2. Print one simple text using the Lambda Expression (No Argument is passed inside the argument list). Ans:- Q3: Example of multiline expression inside the Lambda Body :- write one functional interface with a method having string…
What is the Difference between groupId and artifactId in Maven
The main difference between the groupId and artifactId is groupId specifies the ID of the project group while the artifactId specifies the id of the project. So group Id is always used to identify the project group and artifactId is used to identify the specific project that is developed by that particular group of organization….