Introduction to JavaScript- Features

Javascript

Table of content: What is Javascript JavaScript is a scripting or programming language primarily used for creating interactive and dynamic elements on websites. It is the third layer of the layer cake of standard web technologies, two of which HTML and CSS. It enables you to create dynamically updating content, control multimedia, animate images, and … Read more

Leetcode 283 – Move Zeroes | Two Pointer

Move Zeroes

Problem Description: Given an integer array nums, move all 0‘s to the end of it while maintaining the relative order of the non-zero elements. Example 1: Example 2: Constraints: Move Zeroes – LeetCode Solution(s): To move all zeros to the end of an integer array while maintaining the relative order of the non-zero elements, you can follow … Read more

Leetcode 42 – Trapping Rain Water | Two Pointer

Trapping Rain Water

Problem Description: 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. Example 1 : Example 2: Constraints: Problem Link :Trapping Rain Water – LeetCode Solution(s): Approach 1: Brute Force Solution Java Code: Explanation: 1.Initialization: 2.Main Loop: 3.Finding Maximum Height to the Left: … Read more

Leetcode 88- Merge Sorted Array | Two Pointer

Merge Sorted Array

Problem Descrption: You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommodate this, nums1 has a length of m + n, where the first m elements … Read more

Leetcode 189 – Rotate Array | Three Approaches

Leetcode 189 - Rotate Array

Problem Description: Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. Example 1: Example 2: Constraints: Problem Link : Rotate Array – LeetCode Solution(s): Approach 1: Using temporary array Java Code: Complexity: Approach 2 : In-Place Java Code : Complexity:

Leetcode 27- Remove Element from Array

Leetcode 27- Remove Element

Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which are not equal to val. Consider the number of elements in nums which are not equal to val be k, to get accepted, you need to do the following things: Custom Judge: The judge will test your … Read more

How to create simple horizontal menu bar using HTML and CSS Only

Horizontal menu bar

Navigation is very much part of any web application. It makes website accessible to users. In this article, you will learn ’How to create a basic horizontal navigation bar’ Following is the step-by-step tutorial for doing so. Step 1: Create a div inside the body tag which will hold the menu items: HTML: CSS: Output: Step … Read more

SQL – Primary Key and its use in a Database

Primary Key Constraint

In this article you will learn about- What is primary Key?  A primary key can be defined in either a CREATE TABLE statement or an ALTER TABLE statement. Databases use keys to compare, sort, and store records, and to create relationships between records. Choosing the primary key in a database is one of the most … Read more