This file contains hidden or 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
| class Node(object): | |
| def __init__(self, data): | |
| self.data = data | |
| self.leftchild = None | |
| self.rightchild = None | |
| def insert(self,data): | |
| #all the heavy lifting stuff is done in the node class | |
| if(self.data == data): | |
| return False #we dont want any duplicates |
This file contains hidden or 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
| for _ in range(int(input())): | |
| n = int(input()) | |
| mat = [list(map(int, input().split())) for _ in range(2*n)] | |
| print (sum([max([mat[i][j], | |
| mat[i][2*n-1-j], | |
| mat[2*n-1-i][j], | |
| mat[2*n-1-i][2*n-1-j]]) | |
| for i in range(n) | |
| for j in range(n)])) |
This file contains hidden or 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
| class Vertex: | |
| def __init__(self, value): | |
| self.value = value | |
| self.adjacents = [] | |
| self.state = 0 | |
| class Graph: | |
| def __init__(self): | |
| self.vertices = [] | |
| # self.edges = [] |
This file contains hidden or 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
| /* Main objective is to get the man to the relevent stair (from 1-5) based on user input | |
| Just compile this file and run java newStairs | |
| */ | |
| import java.util.Scanner; | |
| class Stars{ | |
| static void makeStars(String init){ | |
| for (int j = 0;j <= 4 ;j++ ) { | |
| System.out.print(init); | |
| if(j == 4){ | |
| for (int i = 0;i <= 3;i++ ) { |
This file contains hidden or 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
| /*This simple java file allows the user to decrypt any message that was encrypted using reverse alphabet methodology */ | |
| import java.util.Scanner; | |
| class Decrypt{ | |
| public static void main(String[] args) { | |
| Scanner scan = new Scanner(System.in); | |
| System.out.print("Enter the encrypted String : "); | |
| String encrString = scan.nextLine(); |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| void main(){ | |
| int n, m, pos, i; | |
| char text[256], pattern[256]; | |
| printf("Enter the text first\n"); | |
| gets(text); | |
| n = strlen(text); | |
| printf("Enter the pattern\n"); |
This file contains hidden or 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 ..... | |
| const inputUploadFile: CSSProperties = { | |
| display: 'none', | |
| }; | |
| const buttonUploadFile: CSSProperties = { | |
| margin: 8, | |
| }; |
This file contains hidden or 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 { FullTheme, ButtonProps } from "react-native-elements"; | |
| import { Colors } from "react-native-elements/dist/config/colors"; | |
| type RecursivePartial<T> = { [P in keyof T]?: RecursivePartial<T[P]> }; | |
| interface IExtendedThemeButtonProps extends Partial<ButtonProps> { | |
| titleAppearances?: { | |
| titleColors?: { | |
| primary: string; | |
| }; |
This file contains hidden or 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 { useContext } from "react"; | |
| import { FullTheme, ButtonProps, ThemeContext } from "react-native-elements"; | |
| import { ThemeProps } from "react-native-elements/dist/config/ThemeProvider"; | |
| import { Colors } from "react-native-elements/dist/config/colors"; | |
| import { RecursivePartial } from "utils/core"; | |
| interface IExtendedThemeButtonProps extends Partial<ButtonProps> { | |
| titleAppearances?: { | |
| titleColors?: { | |
| primary: string; | |
| }; |
This file contains hidden or 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-native-gesture-handler"; | |
| import React, { FC } from "react"; | |
| import { ReloadInstructions } from "react-native/Libraries/NewAppScreen"; | |
| import { ThemeProvider } from "react-native-elements"; | |
| import theme from "themes"; | |
| const App: FC = () => { | |
| return ( | |
| <ThemeProvider theme={theme}> |
OlderNewer