Skip to content

Instantly share code, notes, and snippets.

View samarthsubramanya's full-sized avatar
🎯
Focusing

SamarthAMS samarthsubramanya

🎯
Focusing
View GitHub Profile
package com.thingsenz.composeui
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
package com.thingsenz.composeui
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.spring
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@samarthsubramanya
samarthsubramanya / SortingMethods.md
Last active January 29, 2023 15:04
Sorting Methods

SELECTION SORT

finds minimum elements and inserts at beginning Least swaps O(n)

for i in range(n):
  t=i
  for j in range(i+1,n):
    if arr[t]>arr[i]:
      t=i
@samarthsubramanya
samarthsubramanya / dark_mode_react.js
Last active February 11, 2022 16:00
React dark mode implementation
import React, {Component} from 'react';
import './App.css';
import SizeContainer from './components/SizeContainer.js';
import {withRouter} from 'react-router-dom';
import { connect } from 'react-redux';
const App = (props) => {
return (
<div className={!props.mode ? "App" : 'night'}>
<h1 style={{height: 50, marginBottom: 0, padding: 5}}>
React Editor