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
| data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwMAAAGQCAYAAADyT7znAAAYLmlDQ1BJQ0MgUHJvZmlsZQAAWIWVWQk4Vd27X/vsM5vnIcMxy5B5zjzPkjnimOfhGJJkyqdCRaREpBmhMqVIGZJIUkhRJBmSqZAUdxvq+/7fvc+9z13Ps/f+ede73vVba71rvet1ANjBTA4NDUTRAxAUHEGxNtQhOTg6kXAjAANQgAi4gQrZIzxU28rKDCDl9/c/y1IfgDa+LyU3bP33+v+1MHh6hXsAAFkh2N0z3CMIwVUAoNk9QikRAGA6EbnAgYjQDTyHYGYKQhAALHoD+2xh9g3svoUlNnVsrHURrAUAnppMpvgAQLvBmxTl4YPYoUU4YhmDPf2CEdUEBGt4+JI9AeB8iOhIBAWFbOBpBIu6/8OOz3/YdP9jk0z2+YO3xrJZ8Hp+4aGB5IP/z+n4v0tQYOTvPviRh9qXYmS9MWZk3m4EhJhuYGoE1we7W1gimBHBT/w8N/U38BvfSCPbbf1pj3BdZM4AK0AW25OsZ4pgLgSzRgbYam9jWTJlsy2ij7LwizC22cbulBDrbfuoqOBAC7NtO8d8vYx/4wKvcP29v3W8/QyMEYx4GqoqxtfGfosnqiXKz84CwbQI7g4P2Gu63fZdjK+uxW8dSqT1BmdBBH/zphhYb+nA7EHhv8cF7/Igb/aF+AKsFeFrY7TVFnbwCncw+83B00tPf4sD7OkVbLvNDUa8S8d6u21KaKDVtj5c4BVoaL01z/Ct8Ki9v9v2RCAOtjUP8Ad/sonVdl9LoRFWNlvc0ChgBnSBHiCBSORxByHAH/h1TddOI39t1RgAMqAAH+AFJLclv1vYb9YEI++9IAZ8QZAXCP/TTmez1gtEIfJff6Rbb0ngvVkbtdkiAHxCcBCaE62BVkObIW8t5JFFK6NVfrcj0f3uFauP1cMaYQ2wO//w8EBYByIPBfj9DzJT5OuFjG6DS/DvMfxtD/MJ8wLzAdOLGc |
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
| function solution($A) { | |
| // write your code in PHP7.0 | |
| $values=array_count_values($A); | |
| foreach($values as $key=>$value){ | |
| if(($value % 2===1)){ | |
| return $key | |
| } | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| llist := &LinkedList{} | |
| llist.Head = &Node{Data: 10} |
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
| public class Queue{ | |
| private Node head; | |
| private int length; | |
| public void printQueue(){ | |
| Node n=this.head; | |
| while(n!=null){ | |
| System.out.println(n.data+""); |
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
| public class Stack{ | |
| private Node head; | |
| //I Prefer this to having to walk the length of the stack everytime. | |
| private int length=0; | |
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
| public class Node{ | |
| int data; | |
| Node next; | |
| Node(int d){ | |
| data=d; | |
| } | |
| } |
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
| package main | |
| import "fmt" | |
| func producer(p chan int, items int) { | |
| defer close(p) | |
| for i := 1; i <= items; i++ { | |
| fmt.Println("Produer Producing ", i) | |
| p <- 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
| func chanFib(n int, f chan int) { | |
| fmt.Println("N is: ", n) | |
| defer close(f) | |
| i, j := 0, 1 | |
| for { | |
| temp := i + j | |
| f <- i + j | |
| j, i = i+j, j | |
| if temp >= n { |
OlderNewer