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
LeetCode solution in python: TwoSum problem
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, … Continue reading LeetCode solution in python: TwoSum problem
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
Loops|Hackerrank|python
Objective In this challenge, we're going to use loops to help us do some simple math. Check out the Tutorial tab to learn more. Task Given an integer, , print its first multiples. Each multiple (where ) should be printed on a new line in the form: n x i = result. Input Format A single integer, . Constraints Output Format Print lines of … Continue reading Loops|Hackerrank|python
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???
How to increase your programming skills???
Programming is one of the most versatile skills on the market in this time. From being able to create company websites to knowing how to easily fix a redirecting error, these skills can be invaluable to an employer and yourself in many ways. However, staying the way you are will never let you be the … Continue reading How to increase your programming skills???
what is c programming??
C is a computer programming language which is come in POP(procedural programming language). That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use. C has been around for several decades and has won widespread acceptance because it gives … Continue reading what is c programming??