Data Structure
 Networking
 RDBMS
 Operating System
 Java
 MS Excel
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP
- Selected Reading
 - UPSC IAS Exams Notes
 - Developer's Best Practices
 - Questions and Answers
 - Effective Resume Writing
 - HR Interview Questions
 - Computer Glossary
 - Who is Who
 
AmitDiwan has Published 10744 Articles
 
							AmitDiwan
386 Views
We are required to write a JavaScript function that takes in an array of numbers and uses the quick sort algorithm to sort it.QuickSort:This algorithm is basically a divide and conquer algorithm where we pick a pivot in every pass of loop and put all the elements smaller than pivot ... Read More
 
							AmitDiwan
1K+ Views
Let’s say that we have a string that may contain any of the following characters.'!', ", " ,"\'" ,";" ,"\"", ".", "-" ,"?"We are required to write a JavaScript function that takes in a string and count the number of appearances of these characters in the string and return that ... Read More
 
							AmitDiwan
201 Views
We are required to write a JavaScript function that takes in two 2-D arrays and returns a boolean based on the check whether the arrays are equal or not. The equality of these arrays, in our case, is determined by the equality of corresponding elements.Both the arrays should have same ... Read More
 
							AmitDiwan
326 Views
Transpose:The transpose of a matrix (2-D array) is simply a flipped version of the original matrix (2-D array). We can transpose a matrix (2-D array) by switching its rows with its columns.ExampleThe code for this will be −const arr = [ [1, 1, 1], [2, 2, 2], ... Read More
 
							AmitDiwan
207 Views
We have an array of literals that contains some duplicate values appearing for many times like this −const arr = [1, 4, 3, 3, 1, 3, 2, 4, 2, 1, 4, 4];We are required to write a JavaScript function that takes in this array and pick out all the duplicate ... Read More
 
							AmitDiwan
539 Views
A number is called Armstrong number if the following equation holds true for that number: xy...z =xx +yy+...+zz, where n denotes the number of digits in the number.For example:153 is an Armstrong number because −11 +55 +33 = 1 + 125 + 27 =153We are required to write a JavaScript ... Read More
 
							AmitDiwan
367 Views
We are required to write a JavaScript function that takes in an array of literals and sorts it using bubble sort.ExampleThe code for this will be −const arr = [4, 56, 4, 23, 8, 4, 23, 2, 7, 8, 8, 45]; const swap = (items, firstIndex, secondIndex) => { ... Read More
 
							AmitDiwan
237 Views
We are required to write a JavaScript function that takes in two numbers say m and k, and returns an array of size k with all the elements of the resulting array adding up to m.ExampleThe code for this will be −const len = 30; const sum = 121; const ... Read More
 
							AmitDiwan
161 Views
We are required to write a JavaScript function that takes in an array of literals and checks if elements are the same or not if read from front or back. Such arrays are also known by the name of palindrome arrays.Some examples of palindrome arrays are −const arr1 = [‘a’, ... Read More
 
							AmitDiwan
390 Views
Suppose, we have two arrays of literals like these −const arr1 = [2, 4, 5, 3, 7, 8, 9]; const arr2 = [1, 4, 5, 2, 3, 7, 6];We are required to write a JavaScript function that takes in two such arrays and returns a new array with all the ... Read More