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
// ------------------------------------------------------------------------- | |
// Filename: astar.h | |
// Version: 3 | |
// Purpose: Provide template for a* algorithm | |
// (c) T.Frogley 1999-2021 | |
// Stable and used in many projects 2003-2021+ | |
// Updated: 2021 to better support behaviour controls, & unordered_set | |
// ------------------------------------------------------------------------- | |
#ifndef ASTAR_H |
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
public class Solution { | |
public String addBinary(String a, String b) { | |
// Start typing your Java solution below | |
// DO NOT write main() function | |
int la = a.length(); | |
int lb = b.length(); | |
int max = Math.max(la, lb); | |
StringBuilder sum = new StringBuilder(""); |