What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-01-24 03:50:27
how to compare the biggest node with the same level BST node c++
// C++ program to find largest // value on each level of binary tree. #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int val; struct Node *left, *r... Add solution -
Java 2022-01-23 07:46:50
java 8 function supplier consumer
@Testpublic void whenNamesPresentUseBothConsumer(){ List<String> cities = Arrays.asList("Sydney", "Dhaka", "New York", "London"); Consumer<List<String>> upperCaseConsumer = list -> {... Add solution -
C# 2022-01-23 06:15:24
parse json C#
Product product = new Product(); product.Name = "Apple"; product.Expiry = new DateTime(2008, 12, 28); product.Price = 3.99M; product.Sizes = new string[] { "Small", "Medium", "Large" }; string json = JsonConvert.Se... Add solution -
Other 2022-01-22 16:15:23
salesforce apex null check
// Existing lengthy code checking for null fields results = [SELECT Name FROM Account WHERE Id = :accId]; if (results.size() == 0) { // Account doesn't exist, isn't visible, was deleted, etc return null; } return results[0].Name; &... Add solution