interviewbit|Min Steps in Infinite Grid|solution:: asked in DirectI

You are in an infinite 2D grid where you can move in any of the 8 directions : (x,y) to (x+1, y), (x - 1, y), (x, y+1), (x, y-1), (x-1, y-1), (x+1,y+1), (x-1,y+1), (x+1,y-1) You are given a sequence of points and the order in which you need to cover the points. Give the minimum … Continue reading interviewbit|Min Steps in Infinite Grid|solution:: asked in DirectI

LeetCode solution in python:Add Two Number in linked list

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Example: Input: (2 -> … Continue reading LeetCode solution in python:Add Two Number in linked list

String|Hackerrank

Objective Today we're expanding our knowledge of Strings and combining it with what we've already learned about loops. Check out the Tutorial tab for learning materials and an instructional video! Task Given a string, , of length  that is indexed from  to , print its even-indexed and odd-indexed characters as  space-separated strings on a single line (see the Sample below for more detail). Note:  is considered to be an even index. … Continue reading String|Hackerrank

operators in python:hackerrank

Objective In this challenge, you'll work with arithmetic operators. Check out the Tutorial tab for learning materials and an instructional video! Task Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent(the percentage of the meal price being added as tax) for a meal, find and print the meal's total cost. Note: Be sure … Continue reading operators in python:hackerrank

Data Types python:Hackerrank question

Objective Today, we're discussing data types. Check out the Tutorial tab for learning materials and an instructional video! Task Complete the code in the editor below. The variables , , and  are already declared and initialized for you. You must: Declare  variables: one of type int, one of type double, and one of type String. Read  lines of input from stdin (according to the sequence … Continue reading Data Types python:Hackerrank question

How to create matrix for cmd and how to run???

there are following steps for create an matrix for cmd in notepad. 1.Open notepad 2.write following code in notepad. @echo off title Matrix color 0a mode 1000 echo Hello Programmer!!! welcome to jarvis world!!!!! pause cls goto Greeting :Greeting echo i've been watching you. pause cls echo this is the Matrix!!!! goto Matrix :matrix echo … Continue reading How to create matrix for cmd and how to run???