### Problem Statement

Find the*n*th digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...

Note:

*n*is positive and will fit within the range of a 32-bit signed integer (*n*< 231).**Link to gitHub**:Code`num1`

and `num2`

represented as string, return the sum of `num1`

and `num2`

.
Note:

- The length of both
`num1`

and`num2`

is < 5100. - Both
`num1`

and`num2`

contains only digits`0-9`

. - Both
`num1`

and`num2`

does not contain any leading zero. - You must not use any built-in BigInteger library or convert the inputs to integer directly.

Given a non-empty integer array of size

In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.

You're given a matrix represented by a two-dimensional array, and two positive integers r and c representing the row number and column number of the wanted reshaped matrix, respectively.

The reshaped matrix need to be filled with all the elements of the original matrix in the same row-traversing order as they were.

If the 'reshape' operation with given parameters is possible and legal, output the new reshaped matrix; Otherwise, output the original matrix.

`0, 1, 2, ..., n`

, find the one that is missing from the array.Problem Statement

Link to Github :Code

Find all the elements of [1, *n*] inclusive that do not appear in this array.

Could you do it without extra space and in O(*n*) runtime? You may assume the returned list does not count as extra space.

Given an array and a value, 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 in place with constant memory.

The order of elements can be changed. It doesn't matter what you leave beyond the new length.

Link to GitHub** : Code**

Link to GitHub

Do not allocate extra space for another array, you must do this in place with constant memory.

For example,

Given input array*nums* =

Given input array

`[1,1,2]`

,
Your function should return length = *nums* being

`2`

, with the first two elements of `1`

and `2`

respectively. It doesn't matter what you leave beyond the new length.Basically we need to validate if we have near by duplicate

Link to Github :code

Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.

You may assume the integer do not contain any leading zero, except the number 0 itself.

The digits are stored such that the most significant digit is at the head of the list.

Link to GitHub :Code

Link to GitHub :Code

Example |

input = {1, 4, 9, 9}

output ={1, 5, 0, 0 } | |

Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).

Link to GitHub :Code

Say you have an array for which the *i*th element is the price of a given stock on day *i*.

If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.

**Link to GitHub** :Code

We can generate PDF in JavaScript using jsPDF library.

Edit in plkr

Steps involved

- Use CDN reference to jsPDF
- Open the document
- Pass the Json Object to the document
- Save the file

Input 12321 is a palindrome number Input 1231 is not a palindrome number

Link to GitHub :Code

There is no option to float center. However by thinking carefully about how elements behave, we can use positioning to achieve the same result

The values for the top and bottom could be anything and we would get the same result

we need to have to set width for the div. If not it would take the full width

Link to GitHub :Code

- Removes an element from the normal document flow.
- It then takes that element and pushes it to the far left as possible.
- Other element would flow far left as possible to floe around the element and takes its original space

.floatRight{ width:200px; height:200px; float:right; background-color: red; }

If we want to inherit css property from other classes we can have nested css classes

Link to Github :Code

Subscribe to:
Posts (Atom)

- Algorithms (49)
- Apache Kafka (7)
- Apache Spark (17)
- Architecture (4)
- Arrays (23)
- Big Data (67)
- Cloud services (5)
- Cognitive technologies (12)
- Data Analytics (2)
- Data Science (1)
- Design (1)
- devOps (1)
- Hadoop (25)
- Hive (8)
- Java (2)
- JavaScript (65)
- JavaScript Run-time (12)
- Machine learning (4)
- Maths (6)
- mongoDb (2)
- MySQL (1)
- Networking (3)
- No SQL (2)
- Node (20)
- Python (16)
- Security (4)
- Spark Grpahx (1)
- Spark MLlib (1)
- Spark Sql (2)
- Spark Streaming (4)
- SQL (15)
- Sqoop (2)
- ssis (3)
- Strings (13)