What do you want to save?
Add Code snippet
New code examples
-
Html 2022-03-17 15:30:22
bootstrap 5 accordion
<!-- bootstrap 5 Accordion --> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header" id="headingOne"> <button class... Add solution -
TypeScript 2022-03-11 15:50:02
DISTINQUISH BETWEEN THE AVERAGE CASE AND WORSE CASE RUNNING TIME AND THE FACTORS AFFECTING THAT AFFECTS THE RUNNING TIME OF AN ALGORITHM
// Return position of largest value in integer array A static int largest(int[] A) { int currlarge = 0; // Position of largest element seen for (int i=1; i<A.length; i++) // For each element if (A[currlarge] < A[i]) // if A... Add solution -
C 2022-02-19 19:55:11
What is Array?
• An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed. You have seen an example of arrays already, in the main m... Add solution -
Javascript 2022-02-19 10:35:24
array map
const myArray = ['Sam', 'Alice', 'Nick', 'Matt']; // Appends text to each element of the array const newArray = myArray.map(name => { return 'My name is ' + name; }); console.log(newArray); // ['My name is Sam', 'My Name is Alice', ...] // Appends ... Add solution -
Python 2022-02-06 21:05:22
Convert MATLAB to Python Reddit
% Constants r1 = 22; r2 = 8; r3 = 22; r4 = 6; r5 = 11; r6 = 10; r7 = r8 = 7; pi = 4*atan(1.0); theta_2 = 270 * pi/180; % Degrees to radians; alpha = 30 * pi/180; theta_7 = theta_2 - pi; % Initial guesses in radians theta_3 = 120 * pi/180; theta_4 = 110 *... Add solution -
Python 2022-01-31 14:11:48
In-place merge two sorted arrays
def merge(X, Y): m = len(X) n = len(Y) # Consider each element `X[i]` of list `X[]` and ignore the element if it is # already in the correct order; otherwise, swap it with the next smaller # element, which happens to be the first e... Add solution -
Javascript 2022-01-26 02:46:21
javascript, reduce
const sum = array.reduce((accumulator, element) => { return accumulator + element; }, 0); // An example that will loop through an array adding // each element to an accumulator and returning it // The 0 at the end initializes accumulator to start at ... Add solution