This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static int MaxPumpPower(int[] fields, int[] waterTowers) | |
{ | |
Array.Sort(fields); | |
Array.Sort(waterTowers); | |
int i = 0, j = 0, maxDistance = 0; | |
while (i < fields.Length && j < waterTowers.Length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static int FindTooSweetPoint(int n) | |
{ | |
int remove = 1, add = n; | |
while (remove <= add) | |
{ | |
int mid = remove + (add - remove) / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static int MaxNumOfAs(int numOfPresses) | |
{ | |
if (numOfPresses <= 6) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useRef,Component } from 'react'; | |
import { createStackNavigator } from '@react-navigation/stack'; | |
import { NavigationContainer } from '@react-navigation/native'; | |
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; | |
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native' | |
import Icon, { Icons } from './src/components/Icons'; | |
import * as colors from './src/assets/css/Colors'; | |
import * as Animatable from 'react-native-animatable'; | |
import { Platform } from 'react-native'; | |
/* Screens */ |