AmitDiwan has Published 10744 Articles

Maximum subarray sum in circular array using JavaScript

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 09:11:28

200 Views

ProblemWe are required to write a JavaScript function that takes in an array of integers, arr, as the first and the only argument.We can consider this array arr to be a circular array, which means the last element of the array will be followed by the first. Our function should ... Read More

Placing integers at correct index in JavaScript

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 07:43:05

118 Views

ProblemWe are required to write a JavaScript function that takes in a string, str, which consists of only ‘[‘ or ‘]’. Our function is supposed to add the minimum number of square brackets ( '[' or ']', and in any positions ) so that the resulting bracket combination string is valid. ... Read More

Finding minimum flips in a binary string using JavaScript

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 07:35:10

199 Views

Monotonically Increasing String:A string of '0's and '1's is monotonically increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.)ProblemWe are required to write a JavaScript function that takes in a binary string, str, as the first and the only ... Read More

Binary subarrays with desired sum in JavaScript

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 07:26:00

106 Views

ProblemWe are required to write a JavaScript function that takes in a binary array, arr, as the first argument, and a number, target, as the second argument.Our function is supposed to count the number of subarrays that exists in the array arr, the sum of whose elements is equal to ... Read More

Difference Between RGB and CMYK

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 07:05:49

298 Views

In this post, we will understand the difference between RGB and CMYK colour schemes −RGB Colour SchemeIt is used with digital works.The primary colours in this scheme are ‘Red’, ‘Green’, and ‘Blue’.It is an additive Type Mixing scheme.The colours of this scheme’s images are more vibrant.It has a wide range ... Read More

Difference Between USART and UART

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 06:58:46

2K+ Views

In this post, we will understand the difference between USART and UART modes −USART (Universal Synchronous/Asynchronous Receiver/Transmitter)The half-duplex mode is used.The speed of USART is more in comparison to UART.It uses data signals as well as clock to work.The data is transmitted in the format of blocks.It can work similar ... Read More

Difference Between Cache and Cookies

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 06:48:33

1K+ Views

In this post, we will understand the difference between cache and cookies −CacheIt helps store the content of the website which is used frequently.The content of the website is stored in the browser.It expires manually.It consumes more space.Different types of cache are: Browser cache and proxy cache.It stores contents like ... Read More

Difference Between WordPress.com and WordPress.org

AmitDiwan

AmitDiwan

Updated on 23-Apr-2021 06:46:40

127 Views

In this post, we will understand the difference between wordpress.com and wordpress.org −Wordpress.orgIt is also known as the real WordPress.It is open source, and can be used by anyone.A domain name and a web hosting service is required to use this.It is also referred to as self-hosted WordPress.User has full ... Read More

Validating alternating vowels and consonants in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Apr-2021 11:57:13

215 Views

ProblemWe are required to write a JavaScript function that takes in a string of English alphabets, str, as the first and the only argument. Our function should return true if and only if the vowels and consonants appear alternatingly in the input string, false otherwise.For example, if the input to ... Read More

Checking for squared similarly of arrays in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Apr-2021 11:49:05

114 Views

ProblemWe are required to write a JavaScript function that takes in two arrays of numbers, arr1 and arr2, as the first and second argument respectively.Our function should return true if and only if every element in arr2 is the square of any element of arr1 irrespective of their order of ... Read More

Advertisements