C# Program to Validate IP Address

Hi geeks, in this article we going to see about the Leetcode's Validate Ip Address Problem. This is one of the important interview question. There are different ways to solve this problem like Naive Approach, Straight Forward Approach, etc. But I solved this problem in a efficient way by using Microsoft framework's packages like System.Net, …

Continue reading C# Program to Validate IP Address

Valid Number

This article explains about Leetcode's Valid Number Explanation and Solution. Validate if a given string can be interpreted as a decimal number. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true" -90e3   " => true" 1e" => false"e3" => false" 6e-1" => true" 99e2.5 " => false"53.5e93" => true" --6 " => false"-+3" => false"95a54e53" => false Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one. However, here …

Continue reading Valid Number

ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take …

Continue reading ZigZag Conversion

C# Program to Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Note:Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231,  231 − 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows. Required …

Continue reading C# Program to Reverse Integer

The Complete C# tutorials

Get ready folks! The Complete C# tutorials is coming very soon with high quality content and detailed explanations! What is C#? History of C# Java vs C# Environment Setup C# Program Structure C# Variables and Data types C# Value and Reference Types C# Control Statements C# Keywords C# Functions C# Arrays C# Class and Objects …

Continue reading The Complete C# tutorials

Join with me!

This is not spam or ad. This is official launch of my blog. To support me, please enter your mail id, below and follow this blog. Enter your email address:

Minimum Absolute Difference

Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements.  Return a list of pairs in ascending order(with respect to pairs), each pair [a, b] follows a, b are from arra < bb - a equals to the minimum absolute difference of any two elements in arr Example 1: Input: arr = [4,2,1,3] Output: [[1,2],[2,3],[3,4]] …

Continue reading Minimum Absolute Difference