Skip to content

Instantly share code, notes, and snippets.

View 0smak's full-sized avatar
🎯
Focusing

Óscar Muñoz 0smak

🎯
Focusing
  • GyrusDS
  • Madrid, Spain
  • 17:29 (UTC +02:00)
View GitHub Profile
@0smak
0smak / Divide&Conquer - Minimum value in a rotated sorted array.js
Last active June 28, 2021 16:05
Minimum value of a sorted and rotated array using divide & conquer
"use strict";
const minArray = a => minArrayRec(a, 0, a.length - 1);
const minArrayRec = (a, i0, iN) => {
if (i0 === iN) return {min: a[i0],index: i0}
else {
const k = Number.parseInt((i0 + iN) / 2);
if ((a[i0] <= a[k]) && (a[k] < a[iN])) return {min: a[i0],index: i0};
else if (a[i0] > a[k]){
<mat-accordion>
<mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
<mat-expansion-panel-header>
<mat-panel-title>
<mat-icon>calendar_today</mat-icon> <span class="show_schedules">Horarios</span>
</mat-panel-title>
</mat-expansion-panel-header>
<app-horarios></app-horarios>
</mat-expansion-panel>
</mat-accordion>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.